SQL query by rows

POST {{baseUrl}}/api/v2/statements?requestId={{uuid}}&async=false

Submits a single statement for execution. Review the statement under the Body tab under the property statement. Make sure to also update the database and warehouse properties to reflect the database and warehouse that you wish to query.

You can further specify that the statement should be executed asynchronously or synchronously via the boolean query parameter async under the Params tab.

Request Params

KeyDatatypeRequiredDescription
requestIdstringUnique ID of the API request. This ensures that the execution is idempotent. If not specified, a new UUID is generated and assigned.
asyncbooleanSet to true to execute the statement asynchronously and return the statement handle. If the parameter is not specified or is set to false, a statement is executed and the first result is returned if the execution is completed in 45 seconds. If the statement execution takes longer to complete, the statement handle is returned.
nullablestringSet to true to execute the statement to generate the result set including null. If the parameter is set to false, the result set value null will be replaced with a string 'null'.

Request Body

{"statement"=>"select seq8(), randstr(1000, random()) from table(generator(rowcount=>600))", "timeout"=>"1000", "database"=>"SNOWFLAKE_SAMPLE_DATA", "schema"=>"TPCDS_SF100TCL", "warehouse"=>"COMPUTE_WH"}

HEADERS

KeyDatatypeRequiredDescription
User-Agentstring(Required) Set this to the name and version of your application (e.g. “applicationName/applicationVersion”). You must use a value that complies with RFC 7231.
X-Snowflake-Authorization-Token-TypestringSpecify the authorization token type for the Authorization header. KEYPAIR_JWT is for Keypair JWT or OAUTH for oAuth token. If not specified, OAUTH is assumed.
Content-Typestring
Acceptstring