diff --git a/website/dbt-versions.js b/website/dbt-versions.js index f611e17b650..99841631fb4 100644 --- a/website/dbt-versions.js +++ b/website/dbt-versions.js @@ -31,6 +31,10 @@ exports.versions = [ ] exports.versionedPages = [ + { + "page": "reference/commands/retry", + "firstVersion": "1.6", + }, { "page": "docs/build/groups", "firstVersion": "1.5", diff --git a/website/docs/reference/commands/retry.md b/website/docs/reference/commands/retry.md new file mode 100644 index 00000000000..0c010ede2c1 --- /dev/null +++ b/website/docs/reference/commands/retry.md @@ -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 results. + +`dbt retry` reuses the [selectors](/reference/node-selection/yaml-selectors) from the previously executed command. + diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 3ad0f1b45a7..116618e29e5 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -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 diff --git a/website/sidebars.js b/website/sidebars.js index 657252b8409..6aa2c6449f2 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -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",