This guide walks you through connecting Snowflake to Conversion and setting up your first sync.Documentation Index
Fetch the complete documentation index at: https://docs.conversion.ai/llms.txt
Use this file to discover all available pages before exploring further.
Before You Begin
Make sure you have the following before starting:ACCOUNTADMINaccess in Snowflake: You’ll need to create a warehouse, role, and user, and grant privileges. TheACCOUNTADMINrole (or an equivalent role with these permissions) is required.- OpenSSL installed locally: Used to generate the key pair Conversion uses to authenticate. Available on macOS and Linux out of the box, and on Windows via WSL or Git Bash.
- The database(s) you want to sync identified: Know which database, and optionally which schemas and tables, Conversion should be able to read from.
- Your Snowflake account identifier: The
<org>-<account>portion of your Snowflake URL (e.g.fntyhkd-zxb06236). You’ll need it when connecting in Step 2.
Step 1: Set Up Snowflake Access
Conversion connects to Snowflake using key-pair authentication. In this step you’ll create a dedicated warehouse, role, and user, configure network access, and generate a key pair. Run the following commands in a Snowflake SQL file. Use theACCOUNTADMIN role.
Create a Virtual Warehouse
Conversion needs a virtual warehouse to run queries. We recommend creating a dedicated warehouse for Conversion so its compute usage is easy to monitor in isolation, but you can reuse an existing one if you prefer.Create a Role and Grant Access
Create a role for Conversion with read access to the tables you want to sync. We recommend granting access at the database level so that Conversion automatically sees new schemas and tables as you add them. No manual SQL changes required as the warehouse evolves.Run the grants above as
ACCOUNTADMIN (or the database’s owner role).Granting Access table-by-table
If your database contains data Conversion shouldn’t see, grant access to specific tables instead of the whole database:Verify the grants worked
Before moving on, confirmCONVERSION_SYNC_ROLE can actually see your database:
Create a User
Create a user for Conversion and assign the role you created.Configure Network Policies
If your Snowflake account uses network policies, allow connections from Conversion’s IP addresses:| Region | IP Addresses |
|---|---|
| US | 35.239.90.161, 35.188.167.166, 34.56.101.43, 34.122.97.230, 34.29.176.66, 35.226.154.44 |
Generate a Private Key
Conversion authenticates using a private key in PKCS#8 PEM format. Generate one using OpenSSL:rsa_key.p8.
Then generate the matching public key:
-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- lines) so you can copy it:
Keep your private key secure. You’ll paste it into Conversion when setting up the connection.
Step 2: Connect Snowflake to Conversion
- In Conversion, go to Settings → CRM & Syncing → Connections.
- Click Add Snowflake connection.
- Fill in the connection details using the values from the earlier steps:
Field What to enter Where it came from Name A friendly label, e.g. Production SnowflakeFree-text, just for your reference in Conversion Account Your account identifier, e.g. fntyhkd-zxb06236The <org>-<account>portion of your Snowflake URL (https://app.snowflake.com/<org>/<account>)Warehouse CONVERSION_SYNCCreated in Step 1 Database MY_DATABASE(replace with your actual database name)The database you granted access to in Step 1 User CONVERSION_SYNC_USERCreated in Step 1 Role CONVERSION_SYNC_ROLECreated in Step 1 Private Key The full contents of rsa_key.p8Generated in Step 1 - Click Connect
Step 3: Create a Sync
After connecting, open your new BigQuery connection and go to the Syncs tab to create a sync. Read more about Setting Up a Sync.Snowflake SQL Reference
Converting Timestamps
Conversion expects Unix timestamps for date/time fields. UseDATE_PART(EPOCH_SECOND, column) to convert Snowflake TIMESTAMP values:
Using last_sync_time
{{last_sync_time}} is a Unix timestamp in seconds (an integer). Conversion substitutes the integer value directly into your query at run time; do not wrap it in quotes.
Use it in a WHERE clause to limit each run to rows that have changed since the last successful sync. On the first sync the value is 0, so every row matches.
To compare it against a Snowflake TIMESTAMP column, convert the integer to a timestamp with TO_TIMESTAMP():
UPDATED_AT might be slightly stale, subtract seconds from the integer before converting:
Building Nested Objects with OBJECT_CONSTRUCT
UseOBJECT_CONSTRUCT to create nested JSON objects like relationshipFields:
Converting Booleans
Snowflake stores booleans as binary (0/1). UseIFF to convert to string values if needed:
Handling NULLs
UseCOALESCE or NVL to provide default values:
Casting Types
UseCAST or :: to convert between types:
Troubleshooting
Column names are still uppercase
If column names remain uppercase despite usingAS "lowercase", check the QUOTED_IDENTIFIERS_IGNORE_CASE setting. Set it to FALSE for your user or role:
“Permission denied” errors
Ensure your role has the required grants:USAGEon the warehouseUSAGEon the database and schemaSELECTon each table you want to query
”Could not connect” errors
Verify that:- Your account identifier is correct (e.g.,
xy12345.us-east-1) - The private key is in PKCS#8 PEM format (starts with
-----BEGIN PRIVATE KEY-----) - The public key is assigned to your Snowflake user
- Conversion’s IP addresses are allowed if you use network policies
Sync taking too long
- Ensure you’re filtering by
last_sync_timeto reduce rows - Select only the columns you need
- Consider using a larger warehouse size
- Reduce sync frequency for large datasets
Frequently Asked Questions
What Snowflake permissions does Conversion need?
What Snowflake permissions does Conversion need?
The role needs
USAGE on the warehouse, database, and schema, plus SELECT on the specific tables you want to sync. Conversion only reads data; it never writes to your Snowflake account.Can I use an encrypted private key?
Can I use an encrypted private key?
No. Conversion requires an unencrypted private key in PKCS#8 PEM format. If your key is encrypted, decrypt it first:
How do I sync from multiple schemas?
How do I sync from multiple schemas?
Use fully-qualified table names in your query:
What if a contact doesn't exist yet?
What if a contact doesn't exist yet?
If you sync a custom object with a
userId or email that doesn’t exist in Conversion, we create the contact automatically with just that identifier. You can enrich that contact’s profile through a separate contacts sync.