-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
alter-table statements during incremental run leads to potential errors on Snowflake #1687
Comments
Thanks for the report @githoov - we'll check it out |
…-on-snowflake (#1687) no-op column expansion on Snowflake + BQ
fixed in #1690 Note: column expansion is still necessary on Snowflake, but we can leverage a statement like:
This has the benefit of being atomic, simple, and presumably a lot faster than the existing approach:
This should also work around the problem noted in this issue: a column in a clustering key cannot be dropped, but it can have its type changed from eg. |
Describe the bug
For incremental models, DBT generates the following:
to accommodate expanding characters in existing columns. This is necessary for Redshift, but Snowflake this is not necessary, as the
string
data type automatically adjusts depending on the data in the table.In some sense, this could even be thought of as a bug, as this series of commands will fail if the dropped column is part of the cluster key in the table, leading to a failed run.
Steps To Reproduce
This is baked into an incremental run of DBT.
System information
The output of
dbt --version
:The text was updated successfully, but these errors were encountered: