Supported Warehouses
BigQuery
Google BigQuery
Snowflake
Snowflake Data Cloud
ClickHouse
ClickHouse Cloud and self-hosted
Databricks
Databricks SQL warehouses
Amazon Redshift
Redshift Serverless and provisioned clusters
Key Concepts
Syncs
A sync defines what data to pull from your warehouse and how to map it to Conversion. Each sync includes:- A destination type: What kind of data you’re syncing (contacts, custom objects, or events)
- A SQL query: The query that returns the data you want to sync
- A schedule: How often the sync runs
Field Mapping
Conversion maps the columns returned by your query to fields in Conversion by column name. The name (orAS alias) of each column in your SELECT clause must match the field key in Conversion exactly, including case.
AS to rename columns whenever your source name doesn’t match the Conversion field key.
Incremental Syncing
Uselast_sync_time in your query to select only rows that have changed since the last successful sync.
last_sync_time is a Unix timestamp in seconds (an integer) that you compare against a timestamp column in your source. On the first run it’s 0 (Unix epoch), so every row matches. On subsequent runs it’s the start time of the previous successful sync.
{{last_sync_time}} in quotes. Most warehouses need a small conversion to compare it against a TIMESTAMP column; see the warehouse-specific guides for exact syntax (TIMESTAMP_SECONDS() in BigQuery, TO_TIMESTAMP() in Snowflake, toDateTime() in ClickHouse, from_unixtime() in Databricks, and TIMESTAMP 'epoch' + {{last_sync_time}} * INTERVAL '1 second' in Redshift).
Unique Keys
Each sync requires a unique key that identifies records. This key determines how Conversion matches incoming rows to existing records:What You Can Sync
Contacts
Sync contacts from your warehouse to create or update contact records in Conversion. Required columns (at least one of):email: The contact’s email address. To create new contacts in Conversion, email address must be provided.userId: Your system’s unique identifier for the contact.
userId is used to match the contact and email is stored on the contact record.
Optional columns:
- Any contact field (e.g.,
first_name,last_name,job_title,phone) - Custom field keys you’ve defined in Conversion
Company Fields
A contact sync can also update fields on each contact’s company. Alias the column to__company__ followed by the company field key. Every other column maps to a contact field, so a column named phone writes the contact’s phone and __company__phone writes the company’s. If the contact has no company yet, Conversion creates one.
Custom Objects
Sync custom objects to create or update records of a specific custom object type. Records are matched by their object ID. Setting one up for the first time? See Syncing Custom Objects from a Warehouse. Required columns:object_id: Your unique identifier for this record. Conversion matches rows to existing records on this value across runs.
- Any field defined on the custom object type, including relationship fields
object_id column, Conversion uses a column named id instead.
You must create the custom object type in Conversion before setting up a sync. The sync will create and update individual objects of that type.
Custom Objects with Relationships
To link each record to a contact, a company, or a record of another custom object, add a relationship field to the custom object you’re syncing. Then alias a column in your query to that field’s key. The column’s value identifies the related record:- If the related record doesn’t exist yet, the link stays pending and completes if that record is created within a few days, for example by a later contacts sync. The sync never creates the related record.
- A relationship field holds one related record. Rows that share an
object_idoverwrite each other’s value for it. - Set a relationship from the object that holds the field. The matching field on the related object (for example, a contact’s list of products) is read-only and can’t be synced.
Events
Sync events to record activity on contacts. Events appear on the contact’s timeline and can trigger workflows. Setting one up for the first time? See Syncing Custom Events from a Warehouse. Required columns:userIdoremail: Identifies the contact the event belongs to (same rules as contacts:userIdis preferred when available)event_name: The name of the eventtimestamp: When the event occurred
- Any event property
event_id: A unique identifier for the event, used for deduplication
event_id is optional but strongly recommended. We use it to deduplicate events, so it must be unique across all your event syncs; prefix it with the table name as shown. If the same event_id is synced twice (for example, when using a time buffer), we’ll ignore the duplicate.Setting Up a Sync
1. Connect Your Warehouse
In Conversion, go to Settings → CRM and syncing → Connections and add a new connection for your warehouse type. You’ll need to provide connection credentials; the specific requirements vary by warehouse. See the warehouse-specific guides for the exact steps.2. Create a Sync
After your warehouse connection is verified, open it and go to the Syncs tab to create a sync:- Click Add Sync
- Select the destination type (Contacts, Custom Objects, or Events)
- For Custom Objects, select the specific object type
- Enter your SQL query
- Set the sync schedule
- Enable the sync
Write the Query with AI
The full-screen SQL editor can write the query for you. Choose the connection and destination type first, then describe the records to sync in the box at the bottom of the editor, for example:Contacts from our customers table with their plan and signup date, only paying customers.The AI reads your warehouse schema, looks up the values it filters on, and runs the query as a preview before writing it into the editor. If the editor already has a query, it changes that query instead. Review the summary and any notes shown above the box, such as a query that reads every row on each run, and use Undo to restore the previous query. Generating a query only changes what’s in the editor; it doesn’t run the sync.
3. Set the Schedule
Choose how often your sync runs:If a sync is still running when the next scheduled run begins, we’ll skip that run. Choose a frequency that gives your query enough time to complete.
Incremental Sync Strategies
Using last_sync_time
Use the timestamp filter shown in Incremental Syncing. See your warehouse’s guide for its timestamp conversion syntax.Time-Buffered Queries
If yourupdated_at timestamps aren’t perfectly reliable, you can add a buffer to catch rows that might have been missed:
event_id column (for events) or rely on the unique key to handle duplicates. Conversion will update existing records rather than creating duplicates.
Full Syncs
For small tables or when you need to ensure complete accuracy, you can omit theWHERE clause to sync all rows on every run. This is less efficient but guarantees no rows are missed.
Monitoring and Troubleshooting
Sync History
View the history of each sync in the Syncs tab. Each run shows:- Start and end time
- Number of rows processed
- Number of successful and failed operations
- Error details (if any)
Common Errors
Sync Taking Too Long
- Filter by
last_sync_timeso each run only reads changed rows - Select only the columns you need
- Reduce sync frequency for large datasets (see Set the Schedule)
Frequently Asked Questions
What happens if a sync fails?
What happens if a sync fails?
If a sync fails, we’ll retry on the next scheduled interval. Partial failures (where some rows succeed and others fail) are logged, and you can download error details from the sync history. Failed rows won’t affect successful rows.
Can I sync the same data to multiple destinations?
Can I sync the same data to multiple destinations?
Yes. You can create multiple syncs from the same warehouse, each with its own query and destination. This is common when you need to sync contacts and their related custom objects from different tables.
Can I transform data in my query?
Can I transform data in my query?
Yes. Use SQL functions to transform data before it reaches Conversion. For example, you can concatenate fields, convert types, or apply conditional logic.
What timezone are timestamps in?
What timezone are timestamps in?
last_sync_time is a Unix timestamp in seconds (UTC). Your query should compare against UTC timestamps. If your data uses a different timezone, convert it in your query.Can I sync objects without relating them to contacts?
Can I sync objects without relating them to contacts?
Yes. Relationship columns are optional. If your query doesn’t select any, the records are created without relationships. You can add relationships later through a separate sync or via the API.
What if a contact doesn't exist yet?
What if a contact doesn't exist yet?
The sync doesn’t create the contact, and the link stays pending for a limited time. See Custom Objects with Relationships.