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

Re-instate hard-deleted records during snapshot #2819

Closed
joelluijmes opened this issue Oct 8, 2020 · 2 comments · Fixed by #2821
Closed

Re-instate hard-deleted records during snapshot #2819

joelluijmes opened this issue Oct 8, 2020 · 2 comments · Fixed by #2821
Labels
enhancement New feature or request

Comments

@joelluijmes
Copy link
Contributor

Context

With PR #2749, dbt now can detect hard-deleted records and mark these records as invalidated. However as rightly mentioned on the PR, when the record returns (i.e. many-to-many link table), dbt won't see it.

In any case, I'd welcome a new issue on the subject of handling hard-delete "returns" so we can move the discussion there and determine which is the most effective and concise approach.

Originally posted by @jtcohen6 in #2749 (comment)

Describe the feature

Deleted records should be added back to the snapshot.

Describe alternatives you've considered

State it as limitation in the docs <-- personally not a fan, we need this feature 😅

Additional context

Read the thread from the PR. Possible solution posted by by @seunghanhong in #2749 (comment) but as replied by @jtcohen6 seems kinda over-engineered.

Who will this benefit?

Anyone who was waiting for snapshotting hard-deletes in first place.

Are you interested in contributing this feature?

Yes no problem, I'll dive in today to see if I can find an easy fix. Nevertheless, open to any suggestions you have 😃

@joelluijmes joelluijmes added enhancement New feature or request triage labels Oct 8, 2020
@seunghanhong
Copy link

Adding where dbt_valid_to is null by @jtcohen6 works great.

@joelluijmes
Copy link
Contributor Author

joelluijmes commented Oct 8, 2020

Adding where dbt_valid_to is null by @jtcohen6 works great.

Sounds great, thanks for letting me know! Currently adapting test to re-instantiate a record in order to make a PR 😏

@joelluijmes joelluijmes changed the title Re-instate hard-deleted records after PR #2749 Re-instate hard-deleted records during snapshot Oct 8, 2020
@jtcohen6 jtcohen6 removed the triage label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants