Before You Begin
Before connecting Redshift, we recommend the following:- Create a dedicated database user — Set up a 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 read replica if possible — Running queries against a replica prevents sync operations from impacting your production cluster.
- 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: Create a Database User
Create a dedicated user for Conversion with read access to the tables you want to sync. Connect to your Redshift cluster and run:Replace
public with your schema name if you use a different schema. Grant SELECT only on the specific tables you want to sync.Step 2: Allow Conversion’s IP Addresses
If your Redshift cluster uses a VPC security group or firewall, allow inbound 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 Redshift to Conversion
- In Conversion, go to Settings → Integrations → Data Warehouse
- Click Add Integration and select Amazon Redshift
- Enter your connection details:
- Name — A friendly name for this connection (e.g., “Production Redshift”)
- Host — Your Redshift cluster endpoint (e.g.,
my-cluster.abc123.us-east-1.redshift.amazonaws.com) - Port — The port number (default: 5439)
- Database — The database name
- User — The username you created
- Password — The user’s password
- Optional: Enable SSL for encrypted connections
- Optional: Configure SSH tunneling if your cluster isn’t publicly accessible
- Click Connect
SSH Tunneling
If your Redshift cluster is in a private subnet, you can connect through an SSH tunnel via a bastion host:- Enable SSH Tunneling in the connection settings
- Enter your bastion host details:
- SSH Host — The bastion host address
- SSH Port — The SSH port (default: 22)
- SSH User — The SSH username
- Click Generate Public Key
- Add the generated public key to the bastion host’s
~/.ssh/authorized_keysfile - 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 Redshift
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 JSON_BUILD_OBJECT 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
Redshift SQL Reference
Converting Timestamps
Conversion expects Unix timestamps for date/time fields. UseEXTRACT(EPOCH FROM column) to convert Redshift TIMESTAMP values:
Using last_sync_time
Thelast_sync_time variable is a Unix timestamp. Cast it to a timestamp to compare against TIMESTAMP columns:
TO_TIMESTAMP:
Building Nested Objects with JSON_BUILD_OBJECT
UseJSON_BUILD_OBJECT to create nested JSON objects like relationshipFields. Cast the result to text:
Handling NULLs
UseCOALESCE or NVL to provide default values:
Casting Types
Use:: or CAST to convert between types:
Querying Across Schemas
Use schema-qualified table names:Troubleshooting
”Permission denied” errors
Ensure your user has the required grants:USAGEon the schemaSELECTon each table you want to query
”Could not connect” errors
Verify that:- Your Redshift cluster is accessible (check security groups and VPC settings)
- Conversion’s IP addresses are allowed in your security group
- The host, port, database, username, and password are correct
- SSL is enabled if your cluster requires it
Connection timeouts
If your cluster is in a private subnet:- Use SSH tunneling through a bastion host
- Ensure the bastion host can reach the Redshift cluster
- Verify the SSH public key is correctly added to the bastion host
Sync taking too long
- Ensure you’re filtering by
last_sync_timeto reduce rows - Select only the columns you need
- Consider using Redshift’s sort keys on your timestamp columns
- Reduce sync frequency for large datasets
Frequently Asked Questions
What Redshift permissions does Conversion need?
What Redshift permissions does Conversion need?
The user needs
USAGE on the schema and SELECT on the specific tables you want to sync. Conversion only reads data—it never writes to your Redshift cluster.Does Conversion support Redshift Serverless?
Does Conversion support Redshift Serverless?
Yes. Use your Redshift Serverless workgroup endpoint as the host. The setup is otherwise identical to a provisioned cluster.
Can I use SSL?
Can I use SSL?
Yes. Enable SSL in the connection settings. Redshift supports SSL connections by default, and we recommend using them for security.
Can I connect to a cluster in a private VPC?
Can I connect to a cluster in a private VPC?
Yes, using SSH tunneling. Configure a bastion host in your VPC that can reach the Redshift cluster, then set up the SSH tunnel in Conversion’s connection settings.
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.