-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] dbt build fails when flag restrict_direct_pg_catalog_access set True #914
Comments
@dave-tomkinson Thanks for the bug report. Would you be able to provide a model with column names and configs for one of the models that fails? You can redact the logic that goes into each column if you prefer. I need to know things like whether the columns are quoted or not, whether they are lowercase or uppercase, etc. I suspect that the SDK returns columns that do not match the case, or which are/aren't quoted as expected. This could cause dbt to attempt to add a column that's already there because of a scenario like One additional note, I'm making the assumption that this is an incremental model with |
I think we're getting 3 main categories of error.
The snippet of generated code where the error is:
In the case of the ones with relation already exists it does look like we have:
A sanitised example of a model with the error
All our column names are lower case with underscore separators. Hope that helps. I also noticed someone else having an issue with the flag in the dbt Redshift slack |
@dave-tomkinson can you share what packages you're depending on in your project? |
Is this a new bug in dbt-redshift?
Current Behavior
When I switch dbt cloud to versionless and I build with no flags set then the build works, but with Warnings to set the flag
restrict_direct_pg_catalog_access
When I set the flag
restrict_direct_pg_catalog_access
to True the build fails, with a number of tables (probably around 10%) FailingMostly with one of these Errors:
Setting it to False or removing the flag means the build works again.
Expected Behavior
The build to succeed with no Warnings.
Steps To Reproduce
In dbt cloud with the project version set to
versionless
Set the following flag in
dbt_project.yml
Run
dbt build
Relevant log output
No response
Environment
Additional Context
In the above
The text was updated successfully, but these errors were encountered: