-
Notifications
You must be signed in to change notification settings - Fork 977
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
dbt retry command #3556
dbt retry command #3556
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @matthewshaver just a few questions/suggestions!
id: "retry" | ||
--- | ||
|
||
`dbt retry` re-executes the last `dbt` command from the node point of failure. If the previously executed `dbt` command was successful, `retry` will finish as a no op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a "no op?" If it stands for something we might want to write it out. Or ink to docs about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spelled it out since it wasn't apparent to me, either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, no-op is no-operation (i.e., do nothing).
- [`run`](/reference/commands/run) | ||
- [`run-operation`](/reference/commands/run-operation) | ||
|
||
`dbt retry` will execute from the node failures recorded in the run_results.json. Executing `dbt retry` without correcting the previous failures will garner idempotent results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good place to add a glossary entry for idempotent. https://docs.getdbt.com/terms/idempotent which I think would be:
<Term id="idempotent" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbt retry
will execute from the node failures recorded in the run_results.json
What is the advice here? Are we asking people to make sure they check run_resuts.json and fix any failures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not expected to do anything with the file itself, we just wanted to give a behind the curtains look at how the feature works. It references that json to determine where to start the retry. Does adding the parenthesis help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@runleonarun Users should not edit run_results.json
themselves, but its output is used by retry
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewshaver This is definitely more helpful! I have a couple non-blocking questions that came up when I was reading this page. Please don't let these hold you up if you need to ship, but they might be helpful to customers.
id: "retry" | ||
--- | ||
|
||
`dbt retry` re-executes the last `dbt` command from the node point of failure. If the previously executed `dbt` command was successful, `retry` will finish as `no operation`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean if you run a dbt retry
when the previous dbt
command succeeded, then nothing happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct.
It'll show a message like “no nodes selected”.
- [`run`](/reference/commands/run) | ||
- [`run-operation`](/reference/commands/run-operation) | ||
|
||
`dbt retry` references **run_results.json** to determine where to start. Executing `dbt retry` without correcting the previous failures will garner <Term id="idempotent" /> results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much clearer, thank you!
|
||
`dbt retry` references **run_results.json** to determine where to start. Executing `dbt retry` without correcting the previous failures will garner <Term id="idempotent" /> results. | ||
|
||
`dbt retry` reuses the selectors from the previously executed command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we link to the Methods page or YAML selectors page to provide more info in case they need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an example to the docs? Something like:
$ dbt build
...
ERROR node_a
$ dbt retry
ERROR node_a
# Fix node_a
$ dbt retry
PASS node_a
$ dbt retry
Nothing to do.
id: "retry" | ||
--- | ||
|
||
`dbt retry` re-executes the last `dbt` command from the node point of failure. If the previously executed `dbt` command was successful, `retry` will finish as `no operation`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct.
It'll show a message like “no nodes selected”.
- [`run`](/reference/commands/run) | ||
- [`run-operation`](/reference/commands/run-operation) | ||
|
||
`dbt retry` references **run_results.json** to determine where to start. Executing `dbt retry` without correcting the previous failures will garner <Term id="idempotent" /> results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth mentioning here that it looks in the target/
directory by default, but a different directory can be passed in with the --state
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolves #3422
What are you changing in this pull request and why?
Documenting the
dbt retry
command new in v1.6Checklist
Uncomment if you're publishing docs for a prerelease version of dbt (delete if not applicable):
Add versioning components, as described in Versioning Docs
Add a note to the prerelease version Migration Guide
Review the Content style guide and About versioning so my content adheres to these guidelines.
Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."
Adding new pages (delete if not applicable):
website/sidebars.js