capabilities.work

Submit SQL Statement and Poll for Results

A 2-step recipe with Snowflake. We can help you get access.

Recipe · 2 steps

Submit SQL Statement and Poll for Results

Submit a SQL statement, poll its execution status, and retrieve the results.

  1. Submit the SQL statement synchronously. If execution completes quickly the result set is returned with a 200; otherwise a 202 is returned with a statement handle to poll.
  2. Check the status of the statement execution by its handle. A 202 means the statement is still in progress; a 200 means it finished and the requested partition of the result set is returned.
What you'll need to have ready
  • authToken: Bearer token (KEYPAIR_JWT, OAUTH, or programmatic access token).
  • tokenType: Value for the X-Snowflake-Authorization-Token-Type header.
  • statement: The SQL statement to execute.
  • warehouse: Warehouse to use when executing the statement.
  • database: Database in which the statement should be executed.
  • schema: Schema in which the statement should be executed.
  • role: Role to use when executing the statement.
  • timeout: Timeout in seconds for statement execution.
For your developer

Arazzo workflow snowflake:submit-sql-statement-and-poll, 2 operations: submitStatement → getStatementStatus. Specs on APIs.io.