GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • v2
  • dbt v2 release tracks
  • Product docs
  • References
  • Best practices
  • Developer blog
  • Guides
  • APIs
  • Release notes
  • FAQs
  • Support and billing
  • Licensing
  • Courses
  • Join the dbt Community

This view

  • Original page
  • New address

GeezerVison is showing docs.getdbt.com — Redshift setup | dbt Developer Hub

View as Markdown
View this page as plain Markdown
Open in ChatGPT
Ask questions about this page
Open in Claude
Ask questions about this page
Open in Perplexity
Ask questions about this page
(Applies to dbt v2.0 and later)

You can configure the Redshift adapter by running dbt init in your CLI or manually providing the profiles.yml file with the fields configured for your authentication type.

The Redshift adapter for dbt v2 supports the following authentication methods:

  • Password
  • IAM profile
  • IAM Identity Center (browser)

Warehouse permissions​

The Redshift database user that dbt v2 uses must be able to run dbt workloads and read catalog metadata used for introspection.

Required Redshift objects​

Before connecting, these objects must exist or be accessible:

ObjectPurpose
Cluster (provisioned) or workgroup (serverless)Compute resource
DatabaseTarget database
SchemaTarget schema within the database
UserDatabase user for authentication
IAM role or profile (optional)For IAM-based authentication

Core permissions​

The following permissions are required for fundamental dbt features:

PermissionObjectPurpose
USAGESchemaAccess the schema
CREATESchemaCreate tables and views in the schema
SELECTTables or viewsRead data
INSERTTablesInsert data
UPDATETablesUpdate data
DELETETablesDelete data
DROPTables or viewsDrop or replace objects
TRUNCATETablesTruncate tables

Metadata operations​

dbt v2 queries these Redshift system relations:

System relationPurposePermission required
SVV_ALL_COLUMNSColumn metadataSELECT on the system view
pg_classList relationsAccess to system catalog
pg_namespaceSchema informationAccess to system catalog
sys_query_detailSource freshness (last insert time)SELECT on the system view
svv_table_infoList materialized views when the project includes themSELECT on the system view
svv_mv_infoList materialized views when the project includes themSELECT on the system view

Schema management​

Conditional permissions for schema management

PermissionObjectWhen required
CREATE SCHEMADatabaseAuto-create schemas

For example SQL grants in Redshift, refer to Redshift permissions.

Configure dbt v2​

Executing dbt init in your CLI will prompt for the following fields:

  • Host: The hostname of your Redshift cluster
  • User: Username of the account that will be connecting to the database
  • Database: The database name
  • Schema: The schema name
  • Port (default: 5439): Port for your Redshift environment

Alternatively, you can manually create the profiles.yml file and configure the fields. See examples in authentication section for formatting. If there is an existing profiles.yml file, you are given the option to retain the existing fields or overwrite them.

Next, select your authentication method. Follow the on-screen prompts to provide the required information.

Supported authentication types​

  • Password
  • IAM profile
  • IAM Identity Center (browser)

Use your Redshift user's password to authenticate. You can also manually enter it in plain text into the profiles.yml file configuration.

Example password configuration​

profiles.yml
default:
target: dev
outputs:
dev:
type: redshift
port: 5439
database: JAFFLE_SHOP
schema: JAFFLE_TEST
ra3_node: true
method: database
host: ABC123.COM
user: [email protected]
password: ABC123
threads: 16
Report incorrect code

Specify the IAM profile to use to connect your v2 sessions. You will need to provide the following information:

  • IAM Profile: The profile name
  • Cluster ID: The unique identifier for your AWS cluster
  • Region: Your AWS region (for example, us-east-1)
  • Use RA3 node type (y/n): Use high performance AWS RA3 node

Example IAM profile configuration​

profiles.yml
default:
target: dev
outputs:
dev:
type: redshift
port: 5439
database: JAFFLE_SHOP
schema: JAFFLE_TEST
ra3_node: false
method: iam
host: YOURHOSTNAME.COM
user: [email protected]
iam_profile: YOUR_PROFILE_NAME
cluster_id: ABC123
region: us-east-1
threads: 16
Report incorrect code

Sign in through AWS IAM Identity Center and set method to browser_identity_center. dbt opens a browser window for you to authenticate without needing a password or IAM profile in your profiles.yml.

Local only

This method works when you run dbt locally from the command line. It isn't supported in the dbt platform yet.

Before you start, make sure your Redshift cluster or workgroup is set up for IAM Identity Center integration. You need the following fields:

Profile fieldRequiredDefaultDescription
methodYes—Set to browser_identity_center.
idc_region*Yes—AWS region where your IAM Identity Center instance lives (for example, us-east-1).
issuer_urlYes—Issuer URL of your IAM Identity Center instance (for example, https://identitycenter.amazonaws.com/ssoins-1234567890abcdef).
idp_listen_portNo7890Local port dbt listens on for the browser redirect after you sign in.
idc_client_display_nameNoAmazon Redshift driverApp name shown in the browser consent prompt.
idp_response_timeoutNo60Seconds dbt waits for you to finish signing in before timing out.

*idc_region isn't the same as your AWS account region. dbt doesn't support setting region alongside browser_identity_center in profiles.yml yet, so it reads your AWS region from your AWS config file (~/.aws/config). Make sure a default region is set there (for example, by running aws configure).

Example IAM Identity Center configuration​

profiles.yml
default:
target: dev
outputs:
dev:
type: redshift
method: browser_identity_center
host: hostname.region.redshift.amazonaws.com
port: 5439
dbname: analytics
schema: analytics
idc_region: us-east-1
issuer_url: https://identitycenter.amazonaws.com/ssoins-1234567890abcdef

# Optional
idp_listen_port: 7890
idc_client_display_name: Amazon Redshift driver
idp_response_timeout: 60
threads: 4
Report incorrect code

Identifier case​

Redshift lowercases names, including quoted names, unless enable_case_sensitive_identifier is set to true in the cluster's parameter group or the Serverless workgroup's configuration. dbt doesn't enable this setting. Refer to Configuring quoting.

More information​

Find Redshift-specific configuration information in the Redshift adapter reference guide.

Was this page helpful?

Privacy policyCreate a GitHub issue

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.