Skip to main content
POST
Run a SQL statement

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-tenant-id
string
required

The organization ID the request is scoped to.

Body

application/json

A SQL statement to run on a connection, saving nothing.

sql
string
required

The statement to run, in the form a custom SQL section's custom_sql_query takes. References to the previous run render empty.

Minimum string length: 1
connection_id
string | null

The connection to run the statement on, as connection_id on /v2/snowflake-accounts and /v2/databricks-connections. Required unless snowflake_account_id names the account.

snowflake_account_id
string | null
deprecated

Deprecated: send connection_id instead. The Snowflake account to run the statement against. When both are sent they must name the same connection.

Response

Successful Response

The rows a SQL statement returned.

columns
string[]
required
read-only

The result's column names, in order. Names Snowflake returns in upper case are lower-cased; a quoted mixed-case name keeps its case.

rows
Rows · object[]
required
read-only

The first 50 rows the statement returned, keyed by column name.

row_count
integer
required
read-only

How many rows rows holds.

duration
string<duration>
required
read-only

How long the statement ran.