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

Support batch-level retries in dbt retry for microbatch models #10729

Closed
Tracked by #10624
MichelleArk opened this issue Sep 17, 2024 · 0 comments
Closed
Tracked by #10624

Support batch-level retries in dbt retry for microbatch models #10729

MichelleArk opened this issue Sep 17, 2024 · 0 comments
Assignees
Milestone

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Sep 17, 2024

The "problem"

How should dbt retry interact with microbatch models? There are three potential states for a microbatch model:

  1. Every batch succeeds
  2. Every batch fails
  3. Some batches succeed AND some batches fail

Cases (1) and (2) are already handled. If every batch succeeds, then the microbatch model as a whole is considered a success and nothing will happen during dbt retry. If every batch fails, then the microbatch model as whole is considered as failed and the model will be rerun during dbt retry. Then there is case (3) which doesn't fit so nicely into successorfailure`. If we consider case (3) a success, then the model won't be rerun on retry and the batches that failed won't get fixed. If we consider case (3) a failure, then the model as a whole would be considered and we'd rerun EVERY batch. This isn't great because what if you have 99 successful batches and only 1 failure? You don't want to redo the 99 previously successful batches, that's more work (and data warehouse cost) that doesn't need to be incurred.

The Solution

Microbatch models that have some successful batches and some failures should be considered a Partial Success. During dbt retry, only the previously failed batches should be retried for a microbatch model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants