Snowflake
An overview of the Snowflake integration with Secoda
Getting Started with Snowflake
There are four steps to connect Snowflake with Secoda.
Create Role for Secoda
Create User for Secoda
Whitelist Secoda IP Address
Connect Snowflake to Secoda in the Secoda UI
You must be either an ACCOUNTADMIN
, or have MANAGE GRANTS
privileges in order to run the commands necessary to connect.
We recommend naming the User, Role, and Warehouse, SECODA_USER
, SECODA_ROLE
, SECODA_WAREHOUSE
respectively. However, naming them this way is not necessary to integrate.
Step 1: Create Role for Secoda
Navigate to Worksheets, select a database, and run the following commands in that database. You'll need to run these commands for all of the databases that you'd like Secoda to import metadata from.
[Optional] If you are using Snowflake Dynamic Tables, to bring in those tables, you have to grant MONITOR
permissions to the SECODA role on all of those tables.
This step has to be repeated for every single dynamic table that you wish to bring into Secoda.
Step 2: Create User for Secoda
If you would like to enable the Push to Snowflake feature, the SECODA_USER must be the owner of the tables, have INSERT privileges on the table, and MODIFY privileges on the schema and database.
Key-Pair Authentication
If you would like you use key-pair authentication instead of a password you will need to:
Configure the key-pair in Snowflake. Once the key is created, you can run the following command to connect the key to the
SECODA_USER
.
Take the final key and convert it to base64 encoding. You can run the following command to convert the key.
Step 3: Whitelist Secoda IP Addresses
If you create a network policy with Snowflake, add the following Secoda IP addresses to the “Allowed IP Addresses” list.
Step 4: Connect Snowflake to Secoda
In the Secoda App, select
Add Integration
on the Integrations page. Search for and select “Snowflake”.Add your credentials as follows:
User - The name of the User created in Step 2.
Password - The Password set in Step 2.
Alternatively you can select the key-pair authentication and enter the private key and passphrase created in step 2.
Account - This is the Account ID of your cluster.
Warehouse - The Warehouse set in Step 1.
How do I find my Account ID?
You can find the Account ID in the Snowflake URL. The account ID is usually a substring of the URL, before snowflakecomputing.com
. If your Snowflake URL does not contain snowflakecomputing.com
, see here to determine your Account ID.
The account ID will likely be the business name, as well as the cloud region, if Snowflake is cloud hosted. See below for some examples.
URL:
https://secoda.snowflakecomputing.com
ACCOUNT ID:
secoda
URL:
https://secoda.us-east-1.snowflakecomputing.com
ACCOUNT ID:
secoda.us-east-1
URL:
https://secoda.west-europe.azure.snowflakecomputing.com
ACCOUNT ID:
secoda.west-europe.azure
Troubleshooting
Account ID is not part of URL
Snowflake has made some recent changes where URLs can be different than the standard format above. In these cases, you can find the correct account id by:
Clicking on the account selector in Snowflake
This should create a URL ending with snowflakecomputing.com
and you can follow the steps abvoe to determine the account id.
Account usage not authorized
In order to resolve this error, please run the following command:
GRANT imported privileges on database SNOWFLAKE to ROLE SECODA;
Could not connect to Snowflake backend after 0 attempt(s)
This error could be the result of an incorrect Account ID. Please double check that your Account ID is properly added.
No active warehouse selected in the current session
This error can be due to the warehouse name not being fully uppercase. Updating the warehouse name to all uppercase letters should resolve this issue.
Last updated