Skip to content
Talk to an Engineer Dashboard

Snowflake Key Pair Auth

Connect to Snowflake via Public Private Key Pair to manage and analyze your data warehouse workloads

Connect to Snowflake via Public Private Key Pair to manage and analyze your data warehouse workloads

Snowflake Key Pair Auth logo

Supports authentication: Bearer Token

Cancel a running Snowflake SQL API statement by statement handle.

NameTypeRequiredDescription
request_idstringNoOptional request ID used when the statement was submitted
statement_handlestringYesSnowflake statement handle to cancel

Execute one or more SQL statements against Snowflake using the SQL API. Requires a valid Snowflake OAuth2 connection. Use semicolons to submit multiple statements.

NameTypeRequiredDescription
asyncbooleanNoExecute statement asynchronously and return a statement handle
bindingsobjectNoBind variables object for ’?’ placeholders in the SQL statement
databasestringNoDatabase to use when executing the statement
nullablebooleanNoWhen false, SQL NULL values are returned as the string “null”
parametersobjectNoStatement-level Snowflake parameters as a JSON object
request_idstringNoUnique request identifier (UUID) used for idempotent retries
retrybooleanNoSet true when resubmitting a previously sent request with the same request_id
rolestringNoRole to use when executing the statement
schemastringNoSchema to use when executing the statement
statementstringYesSQL statement to execute. Use semicolons to send multiple statements in one request.
timeoutintegerNoMaximum number of seconds to wait for statement execution
warehousestringNoWarehouse to use when executing the statement

Query INFORMATION_SCHEMA.COLUMNS for column metadata.

NameTypeRequiredDescription
column_name_likestringNoOptional column name pattern
databasestringYesDatabase name
limitintegerNoMaximum rows
rolestringNoOptional role
schemastringNoOptional schema filter
tablestringNoOptional table filter
warehousestringNoOptional warehouse

Get a specific result partition for a Snowflake SQL API statement.

NameTypeRequiredDescription
partitionintegerYesPartition index to fetch (0-based)
request_idstringNoOptional request ID used when the statement was submitted
statement_handlestringYesSnowflake statement handle returned by Execute Query

Get Snowflake SQL API statement status and first partition result metadata by statement handle.

NameTypeRequiredDescription
request_idstringNoOptional request ID used when the statement was submitted
statement_handlestringYesSnowflake statement handle returned by Execute Query

snowflakekeyauth_get_referential_constraints

Section titled “snowflakekeyauth_get_referential_constraints”

Query INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS.

NameTypeRequiredDescription
databasestringYesDatabase name
limitintegerNoMaximum rows
rolestringNoOptional role
schemastringNoOptional schema filter
tablestringNoOptional table filter
warehousestringNoOptional warehouse

Query INFORMATION_SCHEMA.SCHEMATA for schema metadata.

NameTypeRequiredDescription
databasestringYesDatabase name
limitintegerNoMaximum rows
rolestringNoOptional role
schema_likestringNoOptional schema pattern
warehousestringNoOptional warehouse

Query INFORMATION_SCHEMA.TABLE_CONSTRAINTS.

NameTypeRequiredDescription
constraint_typestringNoOptional constraint type filter
databasestringYesDatabase name
limitintegerNoMaximum rows
rolestringNoOptional role
schemastringNoOptional schema filter
tablestringNoOptional table filter
warehousestringNoOptional warehouse

Query INFORMATION_SCHEMA.TABLES for table metadata in a Snowflake database.

NameTypeRequiredDescription
databasestringYesDatabase name
limitintegerNoMaximum number of rows
rolestringNoOptional role
schemastringNoOptional schema filter
table_name_likestringNoOptional table name pattern
warehousestringNoOptional warehouse

Run SHOW DATABASES or SHOW SCHEMAS.

NameTypeRequiredDescription
database_namestringNoOptional database scope for SHOW SCHEMAS
like_patternstringNoOptional LIKE pattern
object_typestringYesObject type to show
rolestringNoOptional role
warehousestringNoOptional warehouse

Run SHOW GRANTS in common modes (to role, to user, of role, on object).

NameTypeRequiredDescription
grant_viewstringYesSHOW GRANTS variant
object_namestringNoObject name for on_object
object_typestringNoObject type for on_object
rolestringNoOptional execution role
role_namestringNoRole name (for to_role/of_role)
user_namestringNoUser name (for to_user)
warehousestringNoOptional warehouse

snowflakekeyauth_show_imported_exported_keys

Section titled “snowflakekeyauth_show_imported_exported_keys”

Run SHOW IMPORTED KEYS or SHOW EXPORTED KEYS for a table. For reliable execution in this environment, use fully-qualified scope (database_name + schema_name + table_name).

NameTypeRequiredDescription
database_namestringNoOptional database name (recommended with schema_name)
key_directionstringYesWhich command to run
rolestringNoOptional role
schema_namestringNoOptional schema name (recommended with database_name)
table_namestringYesTable name (use with schema_name and database_name for fully-qualified scope)
warehousestringNoOptional warehouse

Run SHOW PRIMARY KEYS with optional scope. When using schema_name (or schema_name + table_name), database_name is required for fully-qualified scope.

NameTypeRequiredDescription
database_namestringNoOptional database name for scope (required when schema_name is set)
rolestringNoOptional role
schema_namestringNoOptional schema name for scope
table_namestringNoOptional table name for scope
warehousestringNoOptional warehouse

Run SHOW WAREHOUSES.

NameTypeRequiredDescription
like_patternstringNoOptional LIKE pattern
rolestringNoOptional role
warehousestringNoOptional warehouse