Redshift Data Graph Setup

Free x
Team x
Business ✓
+
Unify ✓
?

Unify requires a Business tier account and is included with Engage.
See the available plans, or contact Support.

Linked Audiences is in public beta

Linked Audiences (with Data Graph, Linked Events) is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.

At this time, you can only use Redshift with Linked Events.

On this page, you’ll learn how to connect your Redshift data warehouse to Segment.

Getting started

To get started with Redshift:

  1. Log in to Redshift and select the Redshift cluster you want to connect.
  2. Follow these networking instructions to configure network and security settings.

Create a new role and user

Run the SQL commands below to create a role (segment_entities) and user (segment_entities_user).

-- create role
CREATE ROLE segment_entities;

-- allow the role to create new schemas on specified database. (This is the name you chose when provisioning your cluster)
GRANT CREATE ON DATABASE "<enter database name here>" TO ROLE segment_entities;

-- create a user named "segment_entities_user" that Segment will use when connecting to your Redshift cluster. 
CREATE USER segment_entities_user PASSWORD '<enter password here>';

-- grant role permissions to the user
GRANT ROLE segment_entities TO segment_entities_user;

Grant access to schemas and tables

You’ll need to grant access to schemas and tables that you’d like to enrich with. This allows Segment to list schemas, tables, and columns, as well as create entities with data extracted and ingested to Segment.

Schemas

Grant schema permissions based on customer need. Visit Amazon’s docs to view schema permissions and example commands that you can use to grant permissions.

-- view specific schemas in database
GRANT USAGE ON SCHEMA <schema-name> TO ROLE segment_entities;

Tables

Grant table permissions based on customer need. Learn more about Amazon’s table permissions.

-- query data from a specific table in a schema
GRANT SELECT ON TABLE <schema-name>.<table-name> TO ROLE segment_entities;

RETL table permissions

If you used RETL in your database, you’ll need to add the following table permissions:

GRANT USAGE, CREATE ON SCHEMA __segment_reverse_etl TO ROLE segment_entities;

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA __segment_reverse_etl TO ROLE segment_entities;

This page was last modified: 28 Oct 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