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

Explain how transactions (and rollbacks) are handled for incremental strategies #4655

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented Dec 14, 2023

Preview

What are you changing in this pull request and why?

resolves #4635

The goal of this issue is to document the answer to this question from dbt-labs/dbt-core#7011 (comment):

For the DML, we know that only the delete+insert strategy will work, and not merge. With delete+insert incremental strategy, does Dbt wrap both in a single transaction? If not, and they are treated as 2 separate transactions that would be bad. For example, the delete could succeed, and the subsequent insert could fail. The table would then be left with deleted records = Not Good. Can you elaborate on how Dbt already handles that. I cannot find it anywhere in the doc.

🎩

image

Checklist

@dbeatty10 dbeatty10 requested a review from a team as a code owner December 14, 2023 22:57
Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2023 4:31pm

@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels Dec 14, 2023
Copy link
Contributor

@mirnawong1 mirnawong1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @dbeatty10 , lgmt and a small sugg on my end!

@dbeatty10 dbeatty10 enabled auto-merge (squash) December 15, 2023 16:10
@dbeatty10 dbeatty10 merged commit 203cb05 into current Dec 15, 2023
7 checks passed
@dbeatty10 dbeatty10 deleted the dbeatty/explain-incremental-rollbacks branch December 15, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain how transactions (and rollbacks) are handled for incremental strategies
2 participants