Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explain how transactions (and rollbacks) are handled for incremental …
…strategies (#4655) [Preview](https://docs-getdbt-com-git-dbeatty-explain-incremental-957f61-dbt-labs.vercel.app/docs/build/incremental-models#how-do-incremental-models-work-behind-the-scenes) ## 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. ### 🎩 <img width="600" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/6c398757-26a2-42c5-9783-8083ab7e20d0"> ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. --------- Co-authored-by: mirnawong1 <[email protected]>
- Loading branch information