Create saved query
fastero_create_querySave a new SQL query against a connection so it can be scheduled, shared or turned into a report. The SQL is saved, not run; as with fastero_run_sql it must be read-only, and a statement that could change data is refused. Two queries may share a name. Returns the query with its _id, the queryId fastero_create_report and fastero_create_alert take; starting a chart from SQL, fastero_save_chart saves the query and the chart in one call. Where the query computes a business number, fastero_get_definitions holds this organisation's own expression for it, and definitionsUsed records which definitions the query was built from, with their version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL text, in the connection’s own dialect. | |
| name | Yes | The query’s name, as people will see it. | |
| projectId | Yes | The project’s id, from fastero_list_projects. | |
| connectionId | Yes | A data connection’s id, from fastero_list_connections; fastero_create_file_connection makes one of an uploaded CSV or Excel file. | |
| definitionsUsed | No | Names of the shared definitions (metrics, datasets) the SQL was built from. |