-
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
Updating incremental merge WHERE condition to handle nullable fields … #7598
Conversation
…with an appropriate null comparison.
Thank you for opening this @amardatar ! Do you think it's ready for review? Let us know if you need any assistance getting this across the line. |
Yep I think it's ready! Let me know if there's anything more that is required - but is functioning as expected (and seemed fine on the existing tests I ran). |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Hey @dbeatty10 / @jtcohen6 - just wanted to quickly follow-up on this in case it got lost! If it's sitting on a backlog already then don't mind me, just wanted to make sure it's going somewhere eventually :) |
Thanks for checking in @amardatar! Indeed it's on our backlog. |
This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days. |
@dbeatty10 Thanks in advance! |
Since this PR was originally opened, we split the code within dbt-core into several repos:
So there's two things we'll need to do:
Both would be helpful, but adding the test case would be the most helpful. |
Could you please share a link to application test that can be used as example? For now I do not have ideas how it should be implemented. Thanks in advance! |
Hey @dbeatty10 @nikita-sheremet-flocktory I created dbt-labs/dbt-adapters#110 for this. @dbeatty10 as far as the test case goes, and from what I could see, it looked like the existing tests should work for this just with a change in the fixtures (rather than the tests themselves). I've made those edits instead, but I couldn't really work out how tests are currently meant to run (if they're even meant to run from here, or if they should be run from the adapters themselves). |
Thanks for taking the time to open this PR @amardatar! Since opening, we've decoupled dbt Adapters from dbt Core, and this code now lives in a separate repo: dbt-adapters. A consequence of the decoupling is that PR can't be merged anymore as is, so we're closing it. For more context see #9171. The linked issue has already been transferred. Please don't hesitate to re-open your proposed code changes within this PR in the dbt-adapters repo. |
…with an appropriate null comparison.
resolves dbt-labs/dbt-adapters#159
Description
This is a proposed resolution to dbt-labs/dbt-adapters#159 which updates the check in the WHERE condition of the DELETE statement of an incremental merge, to use an additional
{{ target }}.{{ key }} is null and {{ source }}.{{ key }} is null
check to handle nulls.Checklist
changie new
to create a changelog entry