-
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
[CT-247] Support multiple unique_key
for delete+insert
incremental models (Postgres/Redshift/Snowflake/etc)
#4738
Labels
enhancement
New feature or request
incremental
Incremental modeling with dbt
Team:Adapters
Issues designated for the adapter area of the code
Milestone
Comments
github-actions
bot
changed the title
Support multiple
[CT-247] Support multiple Feb 17, 2022
unique_key
for delete+insert
incremental models (Postgres/Redshift/Snowflake/etc)unique_key
for delete+insert
incremental models (Postgres/Redshift/Snowflake/etc)
jtcohen6
added
enhancement
New feature or request
incremental
Incremental modeling with dbt
Team:Adapters
Issues designated for the adapter area of the code
labels
Feb 17, 2022
Merged
4 tasks
@jtcohen6 is this for every adapter? Basically is that what "etc." meant? |
@leahwicz This change is relevant to any adapter that uses |
1 task
4 tasks
resolved by #4858 |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
incremental
Incremental modeling with dbt
Team:Adapters
Issues designated for the adapter area of the code
I'd previously thought this would be harder than it is: #4618 (comment)
When
unique_key
is a list, all we need to do is adjust thedelete
statement:dbt-core/core/dbt/include/global_project/macros/materializations/models/incremental/merge.sql
Lines 50 to 56 in 1df7a02
To use
using
, which should enable multipleunique_key
match conditions. Something like:And a test for it, of course :)
The text was updated successfully, but these errors were encountered: