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

[CT-2704] [Bug] When any of the unique keys is null incremental model duplicates data #7873

Closed
2 tasks done
alejandrofm opened this issue Jun 14, 2023 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working duplicate This issue or pull request already exists incremental Incremental modeling with dbt

Comments

@alejandrofm
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When one or more unique keys have NULL values on the table, the incremental model appends a row instead of replacing the existing one.
So:
1, NULL, 1 duplicates the record
1, 2, 1 works ok

Expected Behavior

take null into account on unique keys of incremental models

Steps To Reproduce

set a unique key that could have NULL values.
run the incremental model twice

Relevant log output

No response

Environment

- OS: Ubuntu
- Python: 3.8
- dbt-core: 1.4

Which database adapter are you using with dbt?

No response

Additional Context

No response

@alejandrofm alejandrofm added bug Something isn't working triage labels Jun 14, 2023
@github-actions github-actions bot changed the title [Bug] When any of the unique keys is null incremental model duplicates data [CT-2704] [Bug] When any of the unique keys is null incremental model duplicates data Jun 14, 2023
@dbeatty10 dbeatty10 added the incremental Incremental modeling with dbt label Jun 14, 2023
@dbeatty10
Copy link
Contributor

Thank you for reporting this @alejandrofm !

This looks like the same thing as dbt-labs/dbt-adapters#159, so I'm going to close this as a duplicate.

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2023
@dbeatty10 dbeatty10 added wontfix Not a bug or out of scope for dbt-core duplicate This issue or pull request already exists and removed triage wontfix Not a bug or out of scope for dbt-core labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists incremental Incremental modeling with dbt
Projects
None yet
Development

No branches or pull requests

2 participants