Create Sql Query
POST/v1/sql
SQL endpoint with simplified templating handled on backend
- sql: Either a direct SQL query or path to SQL file
- templateArgs: Template variables to substitute in the SQL
- contextType: "viz" or "dataset" for file loading context
- contextId: ID of the viz or dataset for file loading
- Backend handles template processing and file loading
Returns:
- If cache hit: { sqlQuery: {..., status: "completed"}, cached: true, url: "presigned_url" }
- If cache miss: { sqlQuery: {..., status: "pending"}, cached: false }
Request
Responses
- 201
- 404
- 422
Successful Response
Not found
Validation Error