Skip to content
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

Fix snapshot check all with an added column (#1797) #2001

Merged
merged 4 commits into from
Dec 13, 2019

Conversation

beckjake
Copy link
Contributor

Fixes #1797

This PR is based on #1994, in the interest of avoiding the merge conflict.

If rows were added to a snapshot, dbt now expands the snapshot table, sets the new column value to null for all the old records, and treats every new row as an updated row.

Added tests.

@cla-bot cla-bot bot added the cla:yes label Dec 11, 2019
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great - nice work!

@beckjake beckjake merged commit b151e2a into dev/0.15.1 Dec 13, 2019
@beckjake beckjake deleted the fix/snapshot-check-all-added-column branch December 13, 2019 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshotting with check_cols='all' doesn't handle schema changes when new columns are added
2 participants