dbt-redshift is the Redshift adapter plugin for dbt (data build tool), enabling data professionals to transform data in Amazon Redshift using SQL. It provides the necessary drivers and specific SQL dialect support to interact with Redshift from a dbt project. As of this entry, the current version is 1.10.1, typically released in sync with dbt-core's quarterly major/minor version updates.
pip install dbt-redshiftVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a basic dbt project to connect to a Redshift cluster. It covers installation, project initialization, configuring `profiles.yml` with essential connection details (using environment variables for credentials), and running a simple dbt model to verify the connection and transformation.
Always install `dbt-redshift` and `dbt-core` with matching minor versions. Use `pip install dbt-core==X.Y.Z dbt-redshift==X.Y.Z`.
Carefully verify all connection parameters in your `profiles.yml` against your Redshift cluster settings. Ensure network connectivity (security groups, firewalls) allows access from where dbt is run.
Refer to the official dbt-redshift documentation for the exact IAM configuration schema. Ensure your AWS credentials and IAM roles have the necessary permissions to generate Redshift credentials.
Grant appropriate permissions to your Redshift user. For example: `GRANT CREATE ON SCHEMA public TO your_user;` and ensure `your_user` can create tables in the desired schemas.
Increase `statement_timeout_in_seconds` in your `profiles.yml` or `dbt_project.yml` for specific models or targets. E.g., `statement_timeout_in_seconds: 1800` (30 minutes).
For complex logic, consider explicitly using `view` or `table` materializations instead of `ephemeral` to avoid unexpected behavior or performance bottlenecks specific to Redshift's query optimizer.