Skip to main content

Snowflake

snowflake-connector-python-backed connector. db_type is snowflake. Tier 1.

Connection config

snowflake
{
"name": "prod-snowflake",
"db_type": "snowflake",
"account": "xy12345.us-east-1",
"database": "ANALYTICS",
"warehouse": "COMPUTE_WH",
"schema_name": "PUBLIC",
"role": "ANALYST",
"username": "...",
"password": "..."
}

Connection fields

FieldRequiredDescription
nameYesConnection name. [a-zA-Z0-9_-], max 64 chars.
db_typeYessnowflake.
accountYesSnowflake account identifier (e.g. xy12345.us-east-1).
usernameYesUser.
passwordOne ofPassword auth.
private_key / private_key_passphraseOne ofPEM-encoded key for key-pair auth.
databaseNoDefault database.
warehouseNoCompute warehouse.
schema_nameNoDefault schema (mapped to schema).
roleNoRole to assume.
connection_timeoutNoLogin timeout, seconds.
query_timeoutNoNetwork timeout, seconds.
keepalive_intervalNoSession keep-alive heartbeat seconds (default 900).

Auth priority: OAuth (oauth_access_token / auth_method: oauth) is tried first, then key-pair (private_key), then password.

Capabilities

CapabilitySupportedNotes
QueryYesServer-side timeout via ALTER SESSION SET STATEMENT_TIMEOUT_IN_SECONDS.
Schema introspectionYes (full)INFORMATION_SCHEMA columns/tables; SHOW TABLES IN DATABASE for clustering keys.
FK discoveryYesINFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS joined to KEY_COLUMN_USAGE.
EXPLAINYesReturns estimated cost, not actual execution stats.
Cost estimationYes (estimated)Estimated credits based on bytes scanned.
Schema statsYesROW_COUNT and BYTES from INFORMATION_SCHEMA.TABLES; clustering keys; table/column comments.

Tier 1.

Dialect notes / gotchas

  • Identifiers are quoted with double quotes ("COL").
  • Use QUALIFY to filter on window functions, LATERAL FLATTEN to expand arrays, ILIKE for case-insensitive matching, and VARIANT for semi-structured data.
  • Metadata queries raise the statement timeout to 120s — large databases can exceed the default.
  • The snowflake-connector-python connection is not thread-safe; metadata queries run sequentially in one thread.

Blocked functions

These Snowflake system functions are blocked inside SELECT (plus all DDL/DML):

  • system$execute_program
  • system$stream_get
  • system$pipe_force_resume
  • system$cancel_all_queries

The universal load_extension / install_extension block also applies.

snowflake-sql — QUALIFY, LATERAL FLATTEN, VARIANT, time travel, and Snowflake date functions.

Cloud vs local

Cloud-only warehouse. In cloud mode, hostnames are validated against the SSRF allow-list (*.snowflakecomputing.com is allowed by default).