Skip to content

Commit

Permalink
dbt retry command (#3556)
Browse files Browse the repository at this point in the history
resolves #3422

## What are you changing in this pull request and why?
Documenting the `dbt retry` command new in v1.6

## Checklist
Uncomment if you're publishing docs for a prerelease version of dbt
(delete if not applicable):
- [x] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)

- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] 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):
- [x] Add page to `website/sidebars.js`
- [x] Provide a unique filename for the new page
  • Loading branch information
matthewshaver authored Jun 26, 2023
2 parents 0df0845 + 414bbe2 commit 574cd3d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ exports.versions = [
]

exports.versionedPages = [
{
"page": "reference/commands/retry",
"firstVersion": "1.6",
},
{
"page": "docs/build/groups",
"firstVersion": "1.5",
Expand Down
22 changes: 22 additions & 0 deletions website/docs/reference/commands/retry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "About dbt retry command"
sidebar_label: "retry"
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`.

Retry works with the following commands:

- [`build`](/reference/commands/build)
- [`compile`](/reference/commands/compile)
- [`seed`](/reference/commands/seed)
- [`snapshot`](/reference/commands/build)
- [`test`](/reference/commands/test)
- [`run`](/reference/commands/run)
- [`run-operation`](/reference/commands/run-operation)

`dbt retry` references [run_results.json](/reference/artifacts/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](/reference/node-selection/yaml-selectors) from the previously executed command.

1 change: 1 addition & 0 deletions website/docs/reference/dbt-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Use the following dbt commands in the [CLI](/docs/core/about-the-cli) and use th
- [init](/reference/commands/init): initializes a new dbt project
- [list](/reference/commands/list): lists resources defined in a dbt project
- [parse](/reference/commands/parse): parses a project and writes detailed timing info
- [retry](/reference/commands/retry): retry the last run `dbt` command from the point of failure (requires dbt 1.6 or higher)
- [rpc](/reference/commands/rpc): runs an RPC server that clients can submit queries to
- [run](/reference/commands/run): runs the models in a project
- [run-operation](/reference/commands/run-operation): invoke a macro, including running arbitrary maintenance SQL against the database
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ const sidebarSettings = {
"reference/commands/init",
"reference/commands/list",
"reference/commands/parse",
"reference/commands/retry",
"reference/commands/rpc",
"reference/commands/run",
"reference/commands/run-operation",
Expand Down

0 comments on commit 574cd3d

Please sign in to comment.