Transforms

Create async query preview

Changed on

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

  • Base URL
    https://connect.weld.app
  • URL
    https://connect.weld.app/transforms/query_previews
  • Auth
    API key in header x-api-key

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"
}

Changes