Redshift Reverse ETL Setup

Set up Redshift as your Reverse ETL source.

Redshift Reverse ETL sources support Segment's dbt extension

If you have an existing dbt account with a Git repository, you can use Segment’s dbt extension to centralize model management and versioning, reduce redundancies, and run CI checks to prevent breaking changes.

To set up Redshift with Reverse ETL:

  1. Log in to Redshift and select the Redshift cluster you want to connect with Reverse ETL.
  2. Follow the networking instructions to configure the correct network and security settings.
  3. Run the SQL commands below to create a user named segment.

     -- create a user named "segment" that Segment will use when connecting to your Redshift cluster.
     CREATE USER segment PASSWORD '<enter password here>';
    
     -- allows the "segment" user to create new schemas on the specified database. (this is the name you chose when provisioning your cluster)
     GRANT CREATE ON DATABASE "<enter database name here>" TO "segment";
    
  4. Follow the steps listed in the Add a source section to finish adding Redshift as your source.

Extra Permissions

Give the segment user read permissions for any resources (databases, schemas, tables) the query needs to access.

Give the segment user write permissions for the Segment managed schema (__segment_reverse_etl), which keeps track of changes to the query results.

Troubleshooting

Extraction failures: relation does not exist

If you are able to run the query in the Query Builder, but the sync fails with the relation does not exist error, please make sure the schema name is included before the database table name, and check that the schema name is correct:

SELECT id FROM <schema_name>.<table_name>

After you’ve successfully added your Redshift source, add a model and follow the rest of the steps in the Reverse ETL setup guide.

This page was last modified: 10 Jun 2024



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account