> ## Documentation Index
> Fetch the complete documentation index at: https://help.getvero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake

> Connect Vero to Snowflake to export customer, campaign, and message interaction data.

**Note:** This is a beta feature. Contact [support@getvero.com](mailto:support@getvero.com) for access.

You can connect Vero to your Snowflake data warehouse to sync your customer, campaign and message interaction activity. Vero has partnered with [Prequel.co](https://prequel.co/) to offer this data destination feature.

## Prerequisites

Before you begin, ensure you have:

* A Snowflake account with a user who has the `securityadmin` and `sysadmin` roles. (To check, run `SHOW GRANTS TO USER <your_username>;` and review the `role` column.)
* Administrative access to your Vero account.

## Overview

To set up Snowflake as a data destination, you'll need to:

1. Contact Vero support to request your public key.
2. Create a role, user, warehouse, and database in Snowflake.
3. Grant schema permissions.
4. Configure your Snowflake network policy (if applicable).
5. Provide your connection details to Vero support.
6. Vero support will complete the connection and confirm.

## Step 1: Contact Vero support to request your public key

Before configuring Snowflake, contact [support@getvero.com](mailto:support@getvero.com) to request an RSA public key. This key will be used to authenticate the data transfer user you create in the next step.

You will receive a public key string loosely resembling the format:

```text theme={null}
MIIBI...<SHORTENED>...Xrw2nwIDAQAB
```

**Note:** You only need the raw key string. Do not include the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` tags when adding the key to Snowflake.

## Step 2: Create a role, user, warehouse, and database in Snowflake

Review the following setup script. Replace the `RSA_PUBLIC_KEY` value with the public key provided by Vero support in Step 1.

```sql theme={null}
BEGIN;

-- create variables for user / role / warehouse / database
SET user_name = 'TRANSFER_USER';
SET role_name = 'TRANSFER_ROLE';
SET warehouse_name = 'TRANSFER_WAREHOUSE';
SET database_name = 'TRANSFER_DATABASE';

-- change role to securityadmin for user / role steps
USE ROLE SECURITYADMIN;

-- create role for data transfer service
CREATE ROLE IF NOT EXISTS IDENTIFIER($role_name);
GRANT ROLE IDENTIFIER($role_name) TO ROLE SYSADMIN;

-- create a user for data transfer service
CREATE USER IF NOT EXISTS IDENTIFIER($user_name)
RSA_PUBLIC_KEY='<REPLACE WITH YOUR PUBLIC KEY FROM STEP 1>';

-- set default role and warehouse
ALTER USER IDENTIFIER($user_name) SET DEFAULT_ROLE = $role_name;
ALTER USER IDENTIFIER($user_name) SET DEFAULT_WAREHOUSE = $warehouse_name;
ALTER USER IDENTIFIER($user_name) SET TYPE = SERVICE;

GRANT ROLE IDENTIFIER($role_name) TO USER IDENTIFIER($user_name);

-- change role to sysadmin for warehouse / database steps
USE ROLE SYSADMIN;

-- create a warehouse for data transfer service
CREATE WAREHOUSE IF NOT EXISTS IDENTIFIER($warehouse_name)
WAREHOUSE_SIZE = XSMALL
WAREHOUSE_TYPE = STANDARD
AUTO_SUSPEND = 60
AUTO_RESUME = TRUE
INITIALLY_SUSPENDED = TRUE;

-- create database for data transfer service
CREATE DATABASE IF NOT EXISTS IDENTIFIER($database_name);

-- grant service role access to warehouse
GRANT USAGE
ON WAREHOUSE IDENTIFIER($warehouse_name)
TO ROLE IDENTIFIER($role_name);

-- grant service access to database
GRANT CREATE SCHEMA, MONITOR, USAGE
ON DATABASE IDENTIFIER($database_name)
TO ROLE IDENTIFIER($role_name);

COMMIT;
```

In the Snowflake interface, select the dropdown next to the **Run** button, and click **Run All**. If successful, you will see `Statement executed successfully` in the query results.

> **Using an existing warehouse or database?** You can change the `warehouse_name` or `database_name` variables to reference your existing resources instead of creating new ones. Ensure the transfer role is granted `USAGE` on the existing warehouse, and `CREATE SCHEMA`, `MONITOR`, and `USAGE` on the existing database.

## Step 3: Grant schema permissions

Vero will write data to a schema named `VERO` in the target database. This schema will be created automatically during the initial connection, using the permissions granted in the script above.

If you prefer to create the schema ahead of time, you may remove the `CREATE SCHEMA` permission from the script in Step 2 and instead run the following:

```sql theme={null}
SET role_name = 'TRANSFER_ROLE';
SET database_name = 'TRANSFER_DATABASE';
SET schema_name = 'VERO';

USE DATABASE IDENTIFIER($database_name);
GRANT ALL PRIVILEGES ON SCHEMA IDENTIFIER($schema_name) TO ROLE IDENTIFIER($role_name);
```

## Step 4: Configure your Snowflake network policy

If your Snowflake account uses network policies, you must allowlist the data syncing service's static IP address.

1. Check for existing network policies:

```sql theme={null}
SHOW NETWORK POLICIES;
```

2. If no policies exist (the query returns no results), you can skip to Step 5.
3. If policies exist, alter the existing policy or create a new one to allowlist the following IP address:

```sql theme={null}
USE ROLE SECURITYADMIN;
CREATE NETWORK POLICY vero_transfer_policy ALLOWED_IP_LIST = ('35.192.85.117/32');
```

> **Important:** If you have no existing network policies and you create your first as part of this step, all other IPs outside of the `ALLOWED_IP_LIST` will be blocked. Be careful when setting your first network policy.

## Step 5: Provide your connection details to Vero support

Once you have completed the setup steps above, reply to Vero support with the following details:

* **Host**: Your Snowflake account host (e.g., `abc12345.us-east-1.snowflakecomputing.com`).
* **Port**: Your Snowflake port (default is `443`).
* **Database**: The database name (e.g., `TRANSFER_DATABASE`).
* **User name**: The user name (e.g., `TRANSFER_USER`).

Please also confirm:

* You have set the RSA public key on the transfer user.
* Your network policy allows the IP address `35.192.85.117/32` (or that you have no network policies in place).

## Step 6: Vero support completes the connection

Vero support will use the details you provide to complete the connection setup. Once done, we will confirm that we were able to connect and write data to your Snowflake instance.

At this point:

* Prequel.co will perform a full data sync to your Snowflake database.
* After the initial sync, updates will be synced periodically.
* You can view the synced tables in your Snowflake console.
* Allow up to 24 hours for the initial full data sync to complete.

## Supported data

For a detailed list of the tables Vero will create and the data synced in each table, refer to the [Exporting data to a data destination](/vero-2/data-destinations/exporting-to-data-destination) help article.

## Securing your connection

* Authentication uses RSA key-pair authentication. No passwords are shared or stored.
* The transfer role only has access to the specific warehouse, database, and schema you configure.
* You maintain full control over your data in Snowflake.
* You can revoke access at any time by removing the transfer user or its permissions.
* All data is transmitted securely using industry-standard encryption.

## Permissions checklist

The following is a summary of the minimum permissions required:

* **Warehouse**: `USAGE` on the target warehouse.
* **Database**: `CREATE SCHEMA`, `MONITOR`, and `USAGE` on the target database (or `USAGE` on the database and `ALL PRIVILEGES` on the `VERO` schema, if pre-created).
* **User**: `RSA_PUBLIC_KEY` set, with `DEFAULT_ROLE` and `DEFAULT_WAREHOUSE` configured.
* **Network policy** (if applicable): `35.192.85.117/32` allowlisted.

## FAQs

### What is Prequel?

[Prequel](https://www.prequel.co) is the trusted vendor used by Vero to ETL data to our customers' data warehouses. Prequel is a market leader in the industry and trusted by businesses such as LaunchDarkly, Zuora, Gong, Webflow, Drata and more.

### How often does data sync?

Prequel.co performs a full data sync when your connection is first established, and thereafter syncs updates periodically.

### How is the Snowflake connection secured?

Vero uses RSA key-pair authentication. You register a public key on a Snowflake user and Vero authenticates using the corresponding private key, so no password is shared or stored. You can also enforce Snowflake network policies to allowlist the data syncing service's IP.

### Can I use an existing warehouse?

Yes. Update the `warehouse_name` variable in the setup script to reference your existing warehouse. Ensure `USAGE` is granted on that warehouse to the transfer role.

### Can I sync to multiple databases?

Yes, you can create multiple Snowflake data connections, each pointing to different databases or projects.

### What happens if the connection fails?

If the connection fails, Vero will retry automatically. You can also contact Vero support to check the connection status.

### Can I delete synced data from Snowflake?

Yes, you have full control over the data in your Snowflake instance. However, because this is a sync connection, any tables you delete will be recreated during the next sync cycle.

If you need to delete data and prevent it from being recreated, contact support to adjust your sync configuration. If you've deleted data and need it restored, you can request a full sync from Vero support.

### Do I need to include the BEGIN/END PUBLIC KEY tags?

No. When adding the public key to Snowflake, only provide the raw key string without the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` tags.
