Connecting a Snowflake warehouse
On this page
This guide explains how to connect your Snowflake warehouse to Adverity.
Prerequisites
Before connecting to Snowflake, perform all of the following actions:
-
Create a dedicated database and user in Snowflake.
-
Grant schema ownership to the user.
-
Assign a single role to the user to prevent execution errors.
-
Configure key-pair authentication for the user:
-
Generate an RSA key pair.
-
Register the public key with the Snowflake user.
For more information, see the Snowflake documentation on key-pair authentication.
-
-
Grant the following privileges to the user’s role:
-
EXECUTE TASK - Required for running tasks owned by the role
-
EXECUTE MANAGED TASK - Required for tasks that rely on serverless compute resources
-
Configure these default values in Snowflake:
-
Default database
-
Default schema
-
Default virtual warehouse
-
Default role (if using role-based access)
Connecting to Snowflake
To connect your Snowflake warehouse to Adverity, follow these steps:
-
Go to the Administration page.
-
In the secondary menu, from the Other section, select Warehouse.
-
Click Connect your warehouse.
-
Select Snowflake from the available options.
-
Fill in the following fields:
- Account ID
Enter your Account ID. You can find it in your Snowflake URL (e.g.,
xyz123.east-1.snowflakecomputing.com) or in the Snowflake Admin Console.- Username
Enter your Snowflake username.
- Key
Enter your private RSA key in PEM format. The key must include the BEGIN and END headers, for example:
-----BEGIN PRIVATE KEY----- ...key content... -----END PRIVATE KEY-----
This is the private key corresponding to the public key you registered with the Snowflake user.
- Passphrase
(Optional) Enter the passphrase for your private key, if you set one when generating the key.
- Database
Enter your target database name.
- Database schema
Enter the target schema for data storage.
-
Click Test connection to verify the provided parameters.
Upon successful validation, you’ll see a confirmation message at the bottom of your screen.
-
Review all connection details and click Next.
-
Verify the configuration details and click Connect.
-
Click Yes, connect to Snowflake warehouse in the confirmation dialog.
Managing Snowflake warehouse settings
After connecting, you can store data from your datastreams directly in your Snowflake warehouse.
From the Warehouse tab of the Administration page, you can:
-
View connection status
-
Contact Support
To rotate your private key or update credentials for your Snowflake warehouse, you can use the multi-warehouse feature. For instructions, see Configuring data warehouses for workspaces.
Switching warehouse providers
If you want to use a different warehouse provider or assign different warehouses to specific workspaces, this can be configured using the multi-warehouse feature. For more information, see Configuring data warehouses for workspaces.
Troubleshooting
Connection validation error
If you receive a connection validation error:
-
Verify your Snowflake user has these permissions:
-
Schema ownership
-
Warehouse usage rights
-
Single role assignment
-
Default database access
-
Default schema access
-
Default virtual warehouse access
-
Default role permissions
-
-
Verify your key-pair authentication is configured correctly:
-
Ensure the public key is registered with the Snowflake user
-
Verify the private key is in PEM format and includes the BEGIN/END headers
-
If using a passphrase, ensure it is entered correctly
If you see the error
Unable to load PEM file, check that your private key includes the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----headers. -
-
Review the configuration status table for specific error details.
-
Click Expand error for comprehensive error information.
-
Contact support if issues persist.