Snowflake

Export Solvimon data to Snowflake

To enable usage of Solvimon's data seamlessly in your Snowflake instance. This page describes the steps necessary to connect your Snowflake instance to Solvimon for data exporting.

Getting started

Requirements

The following access is required for us to set-up a connection from your Snowflake instance to Solvimon.

  • A Snowflake account with the ACCOUNTADMIN role. If you don’t have an account with the ACCOUNTADMIN role, contact your Snowflake administrator to set one up for you.
  • If enforcing a network policy, allow Solvimon's IP addresses to interact with your Snowflake instance.

Step 1: Create dedicated role, user, warehouse and database

This step will ensure granular control and separates Solvimon's data from your own data. By executing the script below, this will automatically set-up a new user and warehouse that can be used for the data exports.

📘

Using an existing warehouse.

By default the script creates a new warehouse and database. This ensures granular controls on the data export process. If you'd prefer to use an existing warehouse, change the solvimon_warehouse variable from SOLVIMON_WAREHOUSE to the name of the warehouse to be shared. In case of an existing database change the solvimon_database variable from SOLVIMON_WAREHOUSE to the name of the database to be shared.

When running the script below, make sure you edit the password ({PASSWORD}) with a secure password. Note that special characters should not be used in the password. We recommend to exclusively use alphanumeric characters in the password.

-- set variables (these need to be uppercase)
set solvimon_role = 'SOLVIMON_ROLE';
set solvimon_username = 'SOLVIMON_USER';
set solvimon_warehouse = 'SOLVIMON_WAREHOUSE';
set solvimon_database = 'SOLVIMON_DATABASE';
set solvimon_schema = 'SOLVIMON_SCHEMA';

-- set user password
set solvimon_password = '{PASSWORD}';

begin;

-- create Solvimon Export role
use role securityadmin;
create role if not exists identifier($solvimon_role);
grant role identifier($solvimon_role) to role SYSADMIN;

-- create Solvimon Export user
create user if not exists identifier($solvimon_username)
password = $solvimon_password
default_role = $solvimon_role
default_warehouse = $solvimon_warehouse;

grant role identifier($solvimon_role) to user identifier($solvimon_username);

-- change role to sysadmin for warehouse / database steps
use role sysadmin;

-- create Solvimon Export warehouse
create warehouse if not exists identifier($solvimon_warehouse)
warehouse_size = xsmall
warehouse_type = standard
auto_suspend = 60
auto_resume = true
initially_suspended = true;

-- create Solvimon Export database
create database if not exists identifier($solvimon_database);

-- grant Solvimon Export warehouse access
grant USAGE
on warehouse identifier($solvimon_warehouse)
to role identifier($solvimon_role);

-- grant Solvimon Export database access
grant OWNERSHIP
on database identifier($solvimon_database)
to role identifier($solvimon_role);

commit;

begin;

USE DATABASE identifier($solvimon_database);

-- create schema for Solvimon Export data
CREATE SCHEMA IF NOT EXISTS identifier($solvimon_schema);

commit;

begin;

-- grant Solvimon Export schema access
grant OWNERSHIP
on schema identifier($solvimon_schema)
to role identifier($solvimon_role);

commit;
👍

Successful query execution

In your Snowflake interface, select the All Queries checkbox, and click Run. This will run every query in the script at once. If successful, you will see Statement executed successfully in the query results.

You can limit this grant down to specific schemas instead of the whole database. Note that to replicate data from multiple Snowflake databases, you can re-run the command above to grant access to all the relevant schemas.

Step 2: Authentication

We support two ways of authenticating:

  • Username and Password
  • OAuth2.0

Username and Password

This is the default authentication option. In this case we will use the username and password generated in Step 1 or a user created by you with the required access.

OAuth2.0

When using OAuth2.0 instead of sharing a username and password you will need to share the client ID (Client ID of your Snowflake developer application) and the client secret (Client Secret of your Snowflake developer application). Optionally you can also share the access and refresh token. For more information you can use this guide to generate the client ID and secret.

Step 3: Set network policies

This step is optional and only required if you are actively denying external access to you Snowflake instance. By default, Snowflake allows users to connect to the service from any computer or device IP address. A security administrator (i.e. users with the SECURITYADMIN role) or higher can create a network policy to allow or deny access to a single IP address or a list of addresses.

In case you actively deny external access you will need to add Solvimon’s IP addresses to the accepted list. Please reach out to us to receive the relevant static IP addresses that should be whitelisted.

Check network policies

To determine whether a network policy is set on your account or for a specific user, execute the SHOW PARAMETERS command (make sure you replace with the relevant username in the User example):

Account

SHOW PARAMETERS LIKE 'network_policy' IN ACCOUNT;

User

SHOW PARAMETERS LIKE 'network_policy' IN USER {USERNAME};

Step 4: Share the relevant information with Solvimon

Please confidently share the following information with us:

FieldDescription
HostThe host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com). Example: accountname.us-east-2.aws.snowflakecomputing.com
RoleThe role you created in Step 1 to access Snowflake. Example: SOLVIMON_USER
WarehouseThe warehouse you created in Step 1 to sync data from. Example: SOLVIMON_WAREHOUSE
DatabaseThe database you created in Step 1 to sync data from. Example: SOLVIMON_DATABASE
SchemaThe schema in which the exported tables should be written to.
UsernameThe username you created in Step 1 to allow access to the database. Example: SOLVIMON_USER
PasswordWhen choosing the username and password option: The password you set in Step 1.
Client IDWhen choosing the OAuth 2.0 option: The Client ID obtained in Step 2.
Client SecretWhen choosing the OAuth 2.0 option: The Client Secret obtained in Step 2.

As soon as we receive this information we will reach out and work with you directly to set-up the relevant data exports.