Overview
The OneSignal + Amazon Redshift integration enables syncing of custom events from your Redshift data warehouse to OneSignal to trigger automated messaging campaigns and Journeys based on user behavior. Amazon Redshift is a fully managed, petabyte-scale data warehouse service that makes it cost-effective to analyze large volumes of data using your existing business intelligence tools.Requirements
- Access to Custom Events (currently in beta)
- Updated Account Plan (not available on free apps).
Amazon Redshift
- Redshift cluster with network access
- Database user with appropriate permissions
- Event tables containing structured behavioral data
- Network connectivity from OneSignal to your Redshift cluster
Setup
1
Create dedicated user for OneSignal
Create a dedicated user account with appropriate permissions:
2
Grant permissions to event data
Provide read access to schemas containing your event data:
3
Configure network access
Add OneSignal’s IP addresses to your Redshift security groups. Redshift prevents external access by default.You can find OneSignal’s IP addresses for your region in the integration settings. For more information, visit the AWS Redshift Help Center.
4
Connect to OneSignal
In OneSignal, go to Data > Integrations and click Add Integration.
- Select Amazon Redshift from the list
- Enter your connection details:
- Host: Your Redshift cluster endpoint
- Port: Usually 5439
- Database: Your database name
- Username:
CENSUS
- Password: The password you created
- Test the connection
- Configure which tables contain your event data
Event data mapping
Map your to OneSignal’s custom events format:OneSignal Field | Description | Required | |
---|---|---|---|
name | event_name | Event identifier | Yes |
external_id | user_id | User identifier | Yes |
timestamp | event_timestamp | When event occurred | No |
properties | event_data | No |
Example Event Table Schema
SQL Query Mode
Write custom SQL queries to transform your event data:dbt Integration
If you’re using dbt with Redshift, ensure OneSignal retains access after each dbt run:Option 1: Fine-grained Permissions
Add post-hooks in your dbt project to grant access after each model builds:Option 2: Default Privileges (Recommended)
Grant default permissions for your dbt production user:Advanced Network Configuration
SSH Tunnel Setup
For Redshift clusters on private networks:- Create SSH user: Set up a dedicated user on your SSH host
- Configure tunnel: Enable “Use SSH Tunnel” in OneSignal integration settings
- Install keypair: Add OneSignal’s public key to
~/.ssh/authorized_keys
- Test connection: Verify tunnel connectivity
VPC Deployment
For Redshift within AWS VPC: OneSignal uses theUNLOAD
command for efficient bulk data extraction. VPC deployments require an S3 VPC Endpoint to allow Redshift to communicate with S3.
Setup S3 VPC Endpoint:
- Navigate to VPC service in AWS Console
- Create VPC Endpoint for S3 service
- Associate with your Redshift subnet
- Configure routing tables
Performance Optimization
Distribution and Sort Keys
Optimize your event tables for analytics workloads:Columnar Storage
Take advantage of Redshift’s columnar storage for analytics:- Compression: Redshift automatically compresses columns
- Zone Maps: Improve query performance with sorted data
- Column-oriented: Efficient for analytical queries on event data
Limitations
- Multiple schemas require separate permission grants
- Views referencing cross-schema tables need additional permissions
- Complex stored procedure access may require additional setup
- VPC deployments require S3 VPC Endpoint configuration
FAQ
How does OneSignal handle large event datasets?
OneSignal uses Redshift’sUNLOAD
command for efficient bulk data extraction, which is optimized for large-scale analytics workloads.