-
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
Adding net-new column to explicit check_cols breaks snapshot #3146
Comments
Thanks for the detailed writeup @annasmith370! I don't believe this has to do with This works if you split the second step into two: Step 1: run initial snapshot{% snapshot example %}
{{config(strategy='check', unique_key='id', check_cols=['name'])}}
select 1 as id, 'foo' as name
{% endsnapshot %} $ dbt snapshot
Step 2: add new column to query, snapshot{% snapshot example %}
{{config(strategy='check', unique_key='id', check_cols=['name'])}}
select 1 as id, 'foo' as name, 'bar' as other
{% endsnapshot %} $ dbt snapshot
Step 3: add new column to check_cols, snapshot{% snapshot example %}
{{config(strategy='check', unique_key='id', check_cols=['name', 'other'])}}
select 1 as id, 'foo' as name, 'bar' as other
{% endsnapshot %}
Good call on finding #1797: When So the question is: When Is this code you'd be interested in contributing? :) |
With redshift & dbt 0.19.1 I was getting the following error: (To help others else find this issue)
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
This issue was closed for being stale. Re-opening since there is related activity in #4893 |
Describe the bug
Snapshots using the "check" strategy
with hard deletes turned onand explicitcheck_cols
break when adding additional columnsSteps To Reproduce
Initially create & run sql:
Update the sql to check an additional column:
Expected behavior
https://docs.getdbt.com/docs/building-a-dbt-project/snapshots
Screenshots and log output
see example
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
macos
The output of
python --version
:Python 3.7.10
Additional context
Tangentially related resolved issue: #1797
The text was updated successfully, but these errors were encountered: