latestOpenAPI 3.0.02026-08-137192110.1 KB

75294f591cc2

Transforms

Create async query preview

Execute a SQL template asynchronously against the data warehouse. The {{weldTag}} references in the template are automatically resolved. Returns a query_execution_id that can be used to poll for status and retrieve results.

post/transforms/query_previews

Request body

sql_templatestring required

The SQL template with {{weldTag}} parameter references to preview.

Example request

{
  "sql_template": "SELECT * FROM {{raw.stripe.payments}} WHERE created_at > CURRENT_DATE - 30"
}

Response

The query has been submitted for execution.

query_execution_idstring required

The unique identifier for the query execution. Use this to poll for status and results.

dw_sqlstring required

The translated data warehouse SQL that was executed.

Example response

{
  "query_execution_id": "qe_abc123def456",
  "dw_sql": "SELECT * FROM stripe_schema.payments WHERE created_at > CURRENT_DATE - 30"
}