Amazon Redshift

Authentication, configuration options, and content for Redshift.

Authentication

Redshift projects require the following configuration settings:

  • Hostname in the form [name].[id].[region].redshift.amazonaws.com
  • Port (usually 5439 )
  • Username and password
  • Database name
Dataform's IP addresses must be whitelisted in order to access your Redshift cluster. Please follow these instructions. Dataform's IP addresses are 35.233.106.210 and 104.196.10.242 .

How to find Redshift credentials

  1. Go to Redshift in your AWS console.
  2. Select your cluster under Clusters .
  3. The hostname is the endpoint listed at the top of the page. Username and database name are listed under cluster database properties.

The Redshift user should have permissions to CREATE schemas and SELECT from INFORMATION_SCHEMAS.TABLES and INFORMATION_SCHEMAS.COLUMNS . Please contact our team via slack if you need help.

Configuration options

Redshift specific options can be applied to tables using the redshift configuration parameter.

Distributing data

You can configure how Redshift distributes data in your cluster by configuring the distStyle and distKey properties.

1config {
2  type: "table",
3  redshift: {
4    distKey: "user_id",
5    distStyle: "key"
6  }
7}
8SELECT user_id FROM ...

This query compiles to the following statement:

1CREATE TABLE "dataform"."example"
2DISTKEY(user_id)
3DISTSTYLE even
4AS SELECT user_id FROM ...

Sorting data

You can also configure how Redshift sorts data in your datasets with the sortKeys and sortStyle properties.

1config {
2  redshift: {
3    sortKeys: [ "ts" ],
4    sortStyle: "compound"
5  }
6}
7SELECT 1 AS ts

Blog posts

Import data from S3 to Redshift using Dataform

The blog post offers a walkthrough to load data from S3 to Redshift.

Getting help

If you are using Dataform web and are having trouble connecting to Redshift, please reach out to us by using the intercom messenger icon at the bottom right of the app.

If you have other questions related to Redshift, you can join our slack community and ask question on the #Redshift channel.

What's next

Snowflake

Authentication, configuration options, and content for Snowflake.

Google BigQuery

Authentication, configuration options, and content for BigQuery.

Azure SQL Data Warehouse

Authentication and configuration options for Azure SQL Data Warehouse.

Postgres

Authentication and configuration options for Postgres.

Sitemap