create_query
Save a SQL query to Redash for reuse, scheduling, or dashboarding. Requires a data source ID and validation before saving.
Instructions
Save a new named SQL query to Redash so it can be reused, scheduled, visualized, or added to a dashboard. Behavior: creates the query and returns its new id, name, and created_at. Usage: get the data_source_id from list_data_sources and verify the SQL runs with run_query first; to change an existing query use update_query instead. Note: this only saves the query — use get_query_result to execute it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the saved query | |
| tags | No | Optional tags to categorize the query (e.g., ['finance', 'weekly']) | |
| query | Yes | The SQL statement to save | |
| description | No | Optional human-readable description of what the query does | |
| data_source_id | Yes | ID of the data source this query runs against (from list_data_sources) |