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

[Feature] model-level retry #11237

Open
3 tasks done
TomWhite-MedStar opened this issue Jan 24, 2025 · 0 comments
Open
3 tasks done

[Feature] model-level retry #11237

TomWhite-MedStar opened this issue Jan 24, 2025 · 0 comments
Labels
enhancement New feature or request triage

Comments

@TomWhite-MedStar
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Config option to specify number of times that a model should be auto-retried before failing that model. Default is 0 times, but can specify a positive number. Optionally also specify a retry-timeout (e.g. waiting X seconds before auto-retry). This could be model-level or global config.

Conceptually, this would be implemented as an option within the try/catch statement with the code that executes the model.

Describe alternatives you've considered

I created custom on-run-end macros that log results details to a table so that I can create a new dbt run --select statement of just the models that failed (e.g. dbt run --select failedModelA+ failedModelB+). However, this requires issuing an entirely new dbt run command. I'd much prefer to conditionally retry failed models a couple times before failing the entire model. This

Who will this benefit?

We use several dbt-core workflows to run several thousand SQL jobs per day to populate our warehouse. Several days per week we run into intermittent cloud vendor issues that cause a failure to schedule a given model (which then kills the entire dbt pipeline).

By contrast, we use Azure Data Factory (ADF) to load data from source to target. It does support task/model-level conditional retry (specifying number of times to retry, and delay in seconds between retry). We have never had data loss or pipeline failures in ADF, largely because of the success of those task-level retries.

Adding this feature to dbt-core would make it much more robust for critical production operations.

Are you interested in contributing this feature?

Yes - but I would need guidance on where to make changes. If I knew where, I could fork project, build unit tests, and submit pull request

Anything else?

No response

@TomWhite-MedStar TomWhite-MedStar added enhancement New feature or request triage labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant