In this article, you’ll learn the following: |
Available in Enterprise for Testing, Feature Experimentation, and Personalize.
Overview
Integrating your VWO account with Snowflake will enable you to stream your VWO experiment data directly to Snowflake. This allows you to consolidate your experiment data in a powerful, scalable data warehouse, providing the ability to run complex SQL queries and perform advanced data analysis.
For example, if you’re exporting both Salesforce and VWO data to Snowflake, you can combine CRM data from Salesforce with A/B test results from VWO. This enables you to analyze customer behaviour patterns, understand how different segments respond to various tests, and develop more effective marketing strategies based on comprehensive customer insights.
Enabling the Integration
To enable this integration, you first need to create the essentials in Snowflake so that VWO can process the integration. Once that is in hand, you can enable the integration in VWO.
Step 1: Set Up Roles, Warehouse, Database, and Schema in Snowflake
- Log in to your Snowflake account.
- Create a role, warehouse, database, and schema for this integration.
- Provide appropriate access permissions to the role, with at least SYSADMIN-level privileges for the warehouse, database, and schema.
- Create a user and assign them a role with at least SYSADMIN-level privileges.
You can use the following script to accomplish all the aforementioned steps:
NOTE: Ensure you follow the Snowflake identifier requirements while renaming the resources.
Step 2: Turn On the Integration at VWO
- Log in to your VWO account.
- From the left panel of your VWO dashboard, go to Configurations > Integrations. This menu provides integrations that can be enabled at the account level.
- Browse for the Snowflake integration, click on it, and turn on the toggle switch to enable it.
- Now, you’ll be taken to the Config tab to connect your Snowflake account with VWO.
Enter the details in the following fields and click Create Connection:
Which Field? | What is it for? |
Host |
The domain of the Snowflake instance, including account, region, cloud environment, and ending with snowflakecomputing.com. E.g., accountname.us-east-2.aws.snowflakecomputing.com |
Role |
The role created for VWO to access Snowflake. E.g., VWO_ROLE |
Warehouse |
The warehouse was created for VWO to sync data into. E.g., VWO_WAREHOUSE |
Database |
The database created for VWO to sync data into. E.g., VWO_DATABASE |
Schema | The default schema used for all statements issued from the connection that do not explicitly specify a schema name |
Username |
The username created to allow VWO to access the database. E.g., VWO_USER |
Password (deprecated) |
The password associated with the username (deprecated). |
Private Key | RSA Private key to use for Snowflake connection |
Passpharse (optional) |
Passphrase for the encrypted private key (it is optional, and only required for the encrypted private key) |
Setting up Key Pair Authentication in Snowflake
Key pair authentication allows you to securely connect to Snowflake using two keys:
- Private Key - This stays safely on your computer and should be kept private as name suggests.
- Public Key - This is uploaded to Snowflake and is used to verify your identity.
Follow the steps below to create and configure key pair authentication.
-
Generate a Private Key- If you do not already have a private/public key pair, you need to generate one. You can do this using the OpenSSL tool (a standard security tool available on most systems).
-
Unencrypted Private Key (no password required each time you use it):
penssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
-
Encrypted Private Key (more secure, requires you to enter a password whenever you use it):
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -v2 aes-256-cbc -out rsa_key.p8
This creates a file called rsa_key.p8 on your machine. This is your private key, keep it secure.
-
-
Generate a Public Key - Once you have the private key, you need to create a matching public key:
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
This will create a file called rsa_key.pub. This is the key you’ll add to Snowflake.
-
Add the Public Key to Your Snowflake Account
- Log in to Snowflake and run the following SQL command:
alter user <user_name> set rsa_public_key='<public_key_value>';
- Replace <user_name> with your actual Snowflake username. (<user_name>, you created on above steps)
- Replace <public_key_value> with the contents of your rsa_key.pub file (copy the entire key, it usually starts with -----BEGIN PUBLIC KEY-----).
- Log in to Snowflake and run the following SQL command:
Use these keys to complete the Snowflake integration on the VWO dashboard.
- Navigate to your VWO dashboard -> Configurations -> Integrations -> Snowflake -> Config.
- Enter the credentials and click Create Connection.
Once the connection is established, your VWO experiment data will start streaming to your Snowflake account.
If you wish to enable the Snowflake integration for your campaigns, select the campaign, go to Configuration > Integrations, and select Snowflake.