Before You Begin
Before connecting Snowflake, we recommend the following:- Create a dedicated user and role — Set up a Snowflake user specifically for Conversion with read-only access to the tables you need. This limits exposure and makes it easy to revoke access if needed.
- Use a separate warehouse — Consider creating a dedicated virtual warehouse for Conversion queries to prevent sync operations from impacting other workloads.
- Sync only the data you need — Select only the columns you’ll use, and always filter with
last_sync_timeto limit results to changed rows.
Step 1: Set Up Snowflake Access
Conversion connects to Snowflake using key-pair authentication. You’ll need to create a warehouse, role, user, and generate a private key. Run the following commands in a Snowflake worksheet. We recommend using theACCOUNTADMIN role.
Create a Virtual Warehouse
Conversion needs a virtual warehouse to run queries. You can create a dedicated one or reuse an existing warehouse.Create a Role and Grant Access
Create a role for Conversion with read access to the tables you want to sync.Create a User
Create a user for Conversion and assign the role you created.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 public key and assign it to your Snowflake user:
Keep your private key secure. You’ll paste it into Conversion when setting up the connection.
Step 2: Allow Conversion’s IP Addresses
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 |
Step 3: Connect Snowflake to Conversion
- In Conversion, go to Settings → Integrations → Data Warehouse
- Click Add Integration and select Snowflake
- Enter your connection details:
- Name — A friendly name for this connection (e.g., “Production Snowflake”)
- Account — Your Snowflake account identifier (e.g.,
xy12345.us-east-1) - Warehouse — The warehouse to use for queries
- Database — The default database
- Schema — The default schema
- User — The username you created
- Role — The role you created
- Private Key — Paste the contents of your
rsa_key.p8file
- Click Connect
Step 4: Create a Sync
After connecting, create a sync to start pulling data:- Click Add Sync
- Select the destination type:
- Contacts — Create or update contact records
- Custom Objects — Create or update custom object records (with optional relationships)
- Events — Record events on contacts
- For Custom Objects, select the specific object type
- Enter your SQL query (see examples below)
- Click Run Query to preview results
- Set the sync schedule (how often to run)
- Click Enable
Writing Queries for Snowflake
Converting Column Names to Lowercase
Snowflake returns column names in uppercase by default. UseAS "lowercase" with double quotes to ensure column names match what Conversion expects:
Contact Sync
Custom Objects (Without Relationships)
To sync objects without relating them to contacts, omit theemail column:
Custom Objects with Relationships
To sync custom objects and their relationships to contacts in a single query, include the contact’semail and use OBJECT_CONSTRUCT for relationship-specific fields:
- Object fields (
id,name,sku,category,price) are stored on the Product object emailidentifies which contact to create a relationship withrelationshipFieldscontains fields stored on the relationship itself (this contact’s role, quantity, etc.)
If multiple rows share the same object
id but have different email values, Conversion creates one object with multiple relationships—one per contact.Events
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
Thelast_sync_time variable is a Unix timestamp. Compare it directly against your timestamp columns:
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 an
email that doesn’t exist in Conversion, we create the contact automatically. You can enrich that contact’s profile through a separate contacts sync.