Search code examples
dbt

Permission Denied when doing a Deployment Run in dbt


I am trying to deploy the master branch of my dbt repository to create the tables in the production schema. My Data Warehouse is in redshift. The error that I am getting is "permission denied for schema" I tried running the compiled queries to create these tables from target/run/ directory in dbt. On running these queries in redshift, they run fine without any error. What permissions am I missing that the deployment job is failing to create the tables?

dbt run failed

Database error: permission denied


Solution

    • Kindly check if you are trying to create a new schema in the code. This is the common mistake all developers do. Check the configuration and change the schema properties
    • If you are trying to create in the existing schema, please check the permission of the user from which you are trying to create the table