{"id":2464,"library":"dbt-redshift","title":"dbt-redshift","description":"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.","status":"active","version":"1.10.1","language":"en","source_language":"en","source_url":"https://github.com/dbt-labs/dbt-adapters/tree/main/dbt-redshift","tags":["dbt","redshift","data-warehousing","etl","sql","data-transformation","adapter"],"install":[{"cmd":"pip install dbt-redshift","lang":"bash","label":"Install dbt-redshift"}],"dependencies":[{"reason":"dbt-redshift is an adapter for dbt-core and requires a compatible version.","package":"dbt-core","optional":false}],"imports":[{"note":"The library primarily provides CLI functionality and configuration-driven interaction via dbt-core.","symbol":"Not applicable for end-users","correct":"dbt-redshift is an adapter, loaded by dbt-core based on your profiles.yml configuration. End-users typically do not directly import symbols from dbt-redshift in Python code."}],"quickstart":{"code":"# 1. Install dbt-redshift\npip install dbt-redshift\n\n# 2. Initialize a new dbt project\ndbt init my_redshift_project\ncd my_redshift_project\n\n# 3. Configure profiles.yml (located in ~/.dbt/profiles.yml or dbt project directory)\n# Create or edit ~/.dbt/profiles.yml with your Redshift connection details:\n# my_redshift_project:\n#   target: dev\n#   outputs:\n#     dev:\n#       type: redshift\n#       host: your-redshift-cluster-endpoint.redshift.amazonaws.com\n#       port: 5439\n#       user: os.environ.get('REDSHIFT_USER', 'your_user')\n#       password: os.environ.get('REDSHIFT_PASSWORD', 'your_password')\n#       dbname: your_database\n#       schema: your_schema\n#       threads: 4\n\n# 4. Create a simple dbt model (e.g., models/example/my_first_dbt_model.sql)\n# -- models/example/my_first_dbt_model.sql\n# select 1 as id, 'hello' as message\n\n# 5. Test the connection and run your model\ndbt debug --target dev\ndbt run","lang":"bash","description":"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."},"warnings":[{"fix":"Always install `dbt-redshift` and `dbt-core` with matching minor versions. Use `pip install dbt-core==X.Y.Z dbt-redshift==X.Y.Z`.","message":"dbt-redshift must be installed with the same minor version as dbt-core (e.g., dbt-core==1.10.x requires dbt-redshift==1.10.x). Mismatched versions will lead to errors.","severity":"breaking","affected_versions":"All versions"},{"fix":"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.","message":"Incorrect or incomplete configuration in `profiles.yml` is a common source of connection errors. This includes wrong `host`, `port`, `user`, `password`, `dbname`, or `schema`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"IAM authentication for Redshift requires specific additional parameters in `profiles.yml` (e.g., `iam_duration_seconds`, `iam_user`, `iam_role_arn`, `cluster_id`, `db_user`). Misconfiguration is frequent.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"Redshift user permissions can prevent dbt from creating schemas or tables. The user configured in `profiles.yml` needs `CREATE` schema/table privileges in the target database.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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).","message":"Long-running dbt models might time out if `statement_timeout_in_seconds` is not configured or set too low. The default may vary but can be insufficient for complex transformations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"Redshift's support for complex ephemeral materializations (especially deeply nested CTEs or specific window functions) can be limited or lead to performance issues. dbt-redshift sometimes converts them to `views` or `tables` or fails.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}