Skip to main content
Version: Next

Snowflake Catalog Connector

Connect to a Snowflake database as a catalog provider for federated SQL query. The Snowflake Catalog Connector automatically discovers schemas and tables within a Snowflake database and makes them available for querying in Spice.

For connecting to individual Snowflake tables, see the Snowflake Data Connector documentation.

Configuration

catalogs:
- from: snowflake:MY_DATABASE
name: my_snowflake
include:
- 'MY_SCHEMA.*' # include all tables from MY_SCHEMA
params:
snowflake_account: myaccount
snowflake_username: ${secrets:SNOWFLAKE_USERNAME}
snowflake_password: ${secrets:SNOWFLAKE_PASSWORD}
snowflake_warehouse: COMPUTE_WH
snowflake_role: ACCOUNTADMIN

from

The from field specifies the Snowflake database to use as a catalog. Use snowflake:<database_name>, where database_name is the name of the Snowflake database.

Hint

Unquoted identifiers in Snowflake are stored as uppercase. Use uppercase database names in the from field. See Snowflake Identifier Resolution.

name

The name field specifies the name of the catalog in Spice. Tables from the Snowflake database will be available under this catalog name. The schema hierarchy of the Snowflake database is preserved in Spice.

include

Use the include field to specify which tables to include from the catalog. The include field supports glob patterns to match multiple tables. For example, *.my_table_name would include all tables with the name my_table_name from any schema. Multiple include patterns are OR'ed together.

params

Parameter NameDescription
snowflake_accountThe Snowflake account identifier.
snowflake_usernameThe Snowflake username for authentication.
snowflake_passwordThe Snowflake password for authentication. Use the secret replacement syntax.
snowflake_warehouseThe Snowflake warehouse to use for queries.
snowflake_roleThe Snowflake role to use.
snowflake_auth_typeAuthentication type: snowflake (default) or keypair.
snowflake_private_keyThe private key content for key pair authentication. Used when auth_type is keypair.
snowflake_private_key_pathPath to a private key file for key pair authentication. Used when auth_type is keypair.
snowflake_private_key_passphrasePassphrase for the private key file, if encrypted.

Authentication

Password authentication (default)

catalogs:
- from: snowflake:MY_DATABASE
name: my_snowflake
params:
snowflake_account: myaccount
snowflake_username: ${secrets:SNOWFLAKE_USERNAME}
snowflake_password: ${secrets:SNOWFLAKE_PASSWORD}

Key pair authentication

catalogs:
- from: snowflake:MY_DATABASE
name: my_snowflake
params:
snowflake_account: myaccount
snowflake_username: ${secrets:SNOWFLAKE_USERNAME}
snowflake_auth_type: keypair
snowflake_private_key_path: /path/to/rsa_key.p8
snowflake_private_key_passphrase: ${secrets:SNOWFLAKE_KEY_PASSPHRASE}

Secrets

Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the secret stores documentation. Additionally, learn how to use referenced secrets in component parameters by visiting the using referenced secrets guide.