Error
v2
Execute compose SQL query
Executes a DuckDB SQL query asynchronously on the pre-aggregate DuckDB engine. Requires run-queries access (interactive viewer and up) and the compose-sql-runner feature flag. The references map exposes previous async queries' results as named tables the SQL can select from ({"orders": "queryUuid"} lets the SQL run SELECT * FROM orders); each referenced query is authorized with the same access checks as Get results, so you can reference any query you can already fetch by uuid. Direct file access in the SQL is rejected. Returns a queryUuid to poll for results via Get results.
POST
Error
Path Parameters
Body
application/json
Construct a type with a set of properties K of type T
Available options:
dashboardView, autorefreshedDashboard, exploreView, filterAutocomplete, chartView, chartHistory, sqlChartView, sqlRunner, viewUnderlyingData, alert, scheduledDelivery, csvDownload, gsheets, scheduledGsheetsChart, scheduledGsheetsDashboard, scheduledGsheetsSqlChart, scheduledChart, scheduledDashboard, calculateTotal, calculateSubtotal, embed, ai, mcp.run_metric_query, mcp.run_sql, mcp.search_field_values, api, cli, metricsExplorer, preAggregateMaterialization, composeSqlRunner, dataAppSample Results of previous async queries exposed to the SQL as tables, keyed by table name: {"orders": ""} lets the SQL run SELECT * FROM orders. Each referenced query is authorized with the same access checks as fetching its results by uuid.
Typed Record<string, UUID> (not Record<string, string>) on purpose: TSOA compiles a string-valued record to an empty object literal and validation then strips every key; a ref-aliased value type keeps additionalProperties intact (and validates the uuid format).