You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
dbt clone fails on Redshift because it creates a view with with no schema binding and tries to add comments on column, which is not supported.
Expected Behavior
This should work automatically, disregarding with no schema binding in project settings:
# dbt_project.yamlmodels:
foobar:
+bind: False
or have a flag to disable it in the command
Steps To Reproduce
Run dbt clone --select "unsorted_data_history" --state latest_artefact/
Error appears
10:39:34 Database Error in model unsorted_data_history (path/to/model/unsorted_data_history.sql)
column "ts" of relation "unsorted_data_history" does not exist
compiled Code at target/run/path/to/model/unsorted_data_history.sql
Which is because it creates a view with with no schema binding
createview "prod"."dev_foo"."unsorted_data_history__dbt_tmp"as (
select*from"prod"."observability"."unsorted_data_history"
) with no schema binding;
Adding a comment to with no schema binding view is not supported by Redshift (docs).
If I omit the with no schema binding, everything works.
Relevant log output
No response
Environment
- OS: Mac
- Python: Python 3.12.4
- dbt:
Core:
- installed: 1.8.6
- latest: 1.8.7 - Update available!
Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
- redshift: 1.8.1 - Up to date!
- postgres: 1.8.2 - Up to date!
Which database adapter are you using with dbt?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Is this a new bug in dbt-core?
Current Behavior
dbt clone
fails on Redshift because it creates a view withwith no schema binding
and tries to add comments on column, which is not supported.Expected Behavior
This should work automatically, disregarding
with no schema binding
in project settings:Steps To Reproduce
dbt clone --select "unsorted_data_history" --state latest_artefact/
with no schema binding
with no schema binding
view is not supported by Redshift (docs).with no schema binding
, everything works.Relevant log output
No response
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: