Setting Up Snowflake as a Target
- Updated on 19 Mar 2020
- 2 minutes to read
Getting started with Rivery and Snowflake:
This guide will show you how to create an S3 bucket for Snowflake staging while also setting the required credentials for using Snowflake with Rivery.
Before you use this guide, Please make sure you have a valid Snowflake account.
If you don't have any valid Snowflake account, please create one here . If you or your organization already has a Snowflake account, you can connect/create a user for Rivery in your account as described here.
Assigning a Snowflake User Role
Snowflake allows a single user to have multiple roles. Rivery will need to execute various commands on Snowflake, so you must assign a SYSADMIN role to the Rivery user you’ll be leveraging:
Access your Snowflake console. Switch role to ACCOUNTADMIN as only an ACCOUNTADMIN can set or unset a user’s role.
Select the worksheet tab.
Run the following commands:
GRANT ROLE SYSADMIN TO USER <user>; ALTER USER <name> SET DEFAULT_ROLE = SYSADMIN;
Creating a Network Policy for Rivery IPs [Optional]
In some cases, your Snowflake account may be access restricted by IPs or domains. In such cases, you must add Rivery IPs to your Snowflake Network Policy in order to connect successfully.
Note: Open Rivery IPs in Snowflake Network Policies may block any other unspecified IPs in the network policy. Make sure you've whitelisted all of your IPs in Snowflake’s network policies before creating Rivery's. Read more about network policies here .
In order to create a Network Policy for Rivery IPs:
Log into your Snowflake account.
Make sure the user is set to a ACCOUNTADMIN or SYSADMIN role
In the worksheet, run the following command:
CREATE OR REPLACE NETWORK POLICY RiveryIPs ALLOWED_IP_LIST = ( ' 22.214.171.124/32 ',' 126.96.36.199/32 ',' 188.8.131.52/32 ' )
Create a Snowflake Connection
Next, setup Rivery for use with Snowflake.
Log into Rivery.
Create a new connection for your Snowflake instance:
Go to Connections.
Select New Connection
From the source list, choose Snowflake.
Now, enter the credentials information that you’ve created in Snowflake’s connection details:
The correct Warehouse you want to run on
Snowflake's Account Name . You can find this in your Snowflake URL
The account name is the trailing letter-number combination of the domain and the region id, if it exists, before the snowflakecomputing.com .
If your Snowflake web address is
Your account name is mysfaccount.eu-central-1
- Optional : Set your Custom FileZone to save the data in your own staging area.
- You can test your connection by clicking the Test Connection button.
- Give your connection a name, and click Save.
You can now pipe data to Snowflake by leveraging this connection in any river!