peaka_execute_sql_query
Execute SQL queries on Peaka projects by providing a project ID and query statement. Requires prior schema inspection and caching check for optimal querying.
Instructions
Runs the given sql query on Peaka.
BEFORE RUNNING THIS TOOL:
1: Use peaka_get_project_metadata to determine which tables should be used in the query and their schemas.
2: Use peaka_list_tables to determine if the tables of interest are cached or not (this response has isCached property)
3: If one or more tables that you need to query are cacheable but not cached:
3a: Warn the user that the results will be limited and ask if you should start the caching process for those tables, and start the caching process using the create cache tool
3b: If the caching is rejected by the user, warn them that the query results will be limited and use LIMIT statements on the query to make sure it doesn't run forever
If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| projectId | Yes | The Peaka project ID to run against. |