-
Notifications
You must be signed in to change notification settings - Fork 175
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
Use common columns for incremental schema changes #38
Conversation
9919be4
to
158e916
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working well in local testing!
Edit: After reviewing the logic in https://github.com/dbt-labs/dbt-bigquery, and trying a few more configurations, I realize that we'll need slightly different behavior for append_new_columns
vs. sync_all_columns
. I'll recommend a change in dbt-core
accordingly.
3185d26
to
0b570e2
Compare
0b570e2
to
1ae2790
Compare
@@ -87,6 +87,21 @@ def run_incremental_append_new_columns(self): | |||
self.list_tests_and_assert(select, exclude, expected) | |||
self.run_tests_and_assert(select, exclude, expected, compare_source, compare_target) | |||
|
|||
def run_incremental_append_new_columns_remove_one(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to test below:
@use_profile('snowflake')
def test__snowflake__run_incremental_append_new_columns(self):
self.run_incremental_append_new_columns()
self.run_incremental_append_new_columns_remove_one()
1ae2790
to
0fea11b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! thank you @Kayrnt!
resolves dbt-labs/dbt-core#4144
Description
Using dbt-labs/dbt-core#4170 changes, the goal is to retrieve the intersection from existing table columns and the tmp table columns for the condition to avoid referencing columns that wouldn't be in one or the other table and lead to a failure of the incremental run.
BigQuery equivalent: dbt-labs/dbt-bigquery#51
Checklist
CHANGELOG.md
and added information about my change to the "dbt-snowflake next" section.