---
title: "Create async query preview"
method: POST
path: "/transforms/query_previews"
tags: ["Transforms"]
---

# Create async query preview

`POST /transforms/query_previews`

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.

## Request body

- QueryPreviewCreateRequestDto
  - `sql_template` string, required — The SQL template with {{weldTag}} parameter references to preview.

## Response `201`

The query has been submitted for execution.

- QueryPreviewCreateResponseDto
  - `query_execution_id` string, required — The unique identifier for the query execution. Use this to poll for status and results.
  - `dw_sql` string, required — The translated data warehouse SQL that was executed.

---

[API](https://skmtc.net/weld/apis/weld-rest-api.md) · [All operations](https://skmtc.net/weld/apis/weld-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/weld/weld-rest-api/revisions/75294f591cc2/schema)
