Feature Availability: Available in Enterprise for Web Experimentation, Feature Experimentation, and Personalize.
This article covers the following:
Overview
Integrating your Wingify account with Snowflake will enable you to stream your Wingify 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 Wingify data to Snowflake, you can combine CRM data from Salesforce with A/B test results from Wingify. 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.
Enable the Integration
To enable this integration, you first need to create the essentials in Snowflake so Wingify can process it. Once that is in hand, you can enable the integration in Wingify.
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.
-- Set variables (must be uppercase)
SET VWO_ROLE = 'VWO_ROLE';
SET VWO_USERNAME = 'VWO_USER';
SET VWO_WAREHOUSE = 'VWO_WAREHOUSE';
SET VWO_DATABASE = 'VWO_DATABASE';
SET VWO_SCHEMA = 'VWO_SCHEMA';
-- Set user password
SET VWO_PASSWORD = 'secure_password';
BEGIN;
-- Create Wingify role
USE ROLE securityadmin;
CREATE ROLE IF NOT EXISTS IDENTIFIER($VWO_ROLE);
GRANT ROLE IDENTIFIER($VWO_ROLE) TO ROLE SYSADMIN;
-- Create Wingify user
CREATE USER IF NOT EXISTS IDENTIFIER($VWO_USERNAME)
PASSWORD = $VWO_PASSWORD
DEFAULT_ROLE = $VWO_ROLE
DEFAULT_WAREHOUSE = $VWO_WAREHOUSE;
GRANT ROLE IDENTIFIER($VWO_ROLE) TO USER IDENTIFIER($VWO_USERNAME);
-- Switch role to sysadmin for warehouse and database setup
USE ROLE sysadmin;
-- Create Wingify warehouse
CREATE WAREHOUSE IF NOT EXISTS IDENTIFIER($VWO_WAREHOUSE)
WAREHOUSE_SIZE = 'XSMALL'
WAREHOUSE_TYPE = 'STANDARD'
AUTO_SUSPEND = 60
AUTO_RESUME = TRUE
INITIALLY_SUSPENDED = TRUE;
-- Create Wingify database
CREATE DATABASE IF NOT EXISTS IDENTIFIER($VWO_DATABASE);
-- Grant Wingify warehouse access
GRANT USAGE
ON WAREHOUSE IDENTIFIER($VWO_WAREHOUSE)
TO ROLE IDENTIFIER($VWO_ROLE);
-- Grant Wingify database access
GRANT OWNERSHIP
ON DATABASE IDENTIFIER($VWO_DATABASE)
TO ROLE IDENTIFIER($VWO_ROLE);
COMMIT;
BEGIN;
USE DATABASE IDENTIFIER($VWO_DATABASE);
-- Create schema for Wingify data
CREATE SCHEMA IF NOT EXISTS IDENTIFIER($VWO_SCHEMA);
COMMIT;
BEGIN;
-- Grant Wingify schema access
GRANT OWNERSHIP
ON SCHEMA IDENTIFIER($VWO_SCHEMA)
TO ROLE IDENTIFIER($VWO_ROLE);
COMMIT;Create a Connection in Wingify
- Log in to your Wingify account.
- From the left panel of your Wingify dashboard, go to Configurations > Integrations.
- Select the Snowflake integration and click Create connection. The Create connection modal appears, showing the Export data to Snowflake option (tagged Connector).
- Select Export data to Snowflake to proceed to the connection details form.
- 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 Wingify to access Snowflake. E.g., VWO_ROLE |
| Warehouse | The warehouse was created for Wingify to sync data into. E.g., VWO_WAREHOUSE |
| Database | The database created for Wingify 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 Wingify 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 |
| Passphrase (optional) | Passphrase for the encrypted private key (it is optional, and only required for the encrypted private key) |
Note: Snowflake has deprecated password-based authentication. To maintain secure and seamless access, a Key Pair Authentication support is added, which verifies identity using a public/private key pair instead of a traditional username and password.
Set 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 the 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):
openssl 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.p8This 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.pubThis 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-----).
-
Note: After generating the key pair and adding the public key to Snowflake, return to the Snowflake connection form in Wingify and enter the Private Key and Passphrase (if applicable) to complete the setup.
Once the connection is established, your Wingify experiment data will start streaming to your Snowflake account.
If you wish to enable the Snowflake integration for your campaigns, go to Web Experimentation and select the campaign. Then, go to Configuration > Integrations and select Snowflake.
Need more help?
For more information or further assistance, contact Wingify Support.