From 39bb86a398532f91c73c42bc7a74502bd0b427df Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:42:18 -0600 Subject: [PATCH 1/4] Remove non-functional example command --- website/docs/reference/node-selection/syntax.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index ed0b563731d..aeea93e2d59 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -111,7 +111,6 @@ Constructing and debugging your selection syntax can be challenging. To get a " dbt ls --select "path/to/my/models" # Lists all models in a specific directory. dbt ls --select "source_status:fresher+" # Shows sources updated since the last dbt source freshness run. dbt ls --select state:modified+ # Displays nodes modified in comparison to a previous state. -dbt ls --select "result:+ state:modified+ --defer --state ./" # Lists nodes that match certain [result statuses](/reference/node-selection/syntax#the-result-status) and are modified. ``` From 610bb8ad3056e70d397d45691c754c41fb6e71b3 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:51:28 -0600 Subject: [PATCH 2/4] Fix code examples --- website/docs/reference/node-selection/syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index aeea93e2d59..f1a53e71359 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -185,7 +185,7 @@ After issuing one of the above commands, you can reference the results by adding ```bash # You can also set the DBT_STATE environment variable instead of the --state flag. -dbt run --select "result: --defer --state path/to/prod/artifacts" +dbt run --select result: --defer --state path/to/prod/artifacts ``` The available options depend on the resource (node) type: @@ -204,7 +204,7 @@ The available options depend on the resource (node) type: The state and result selectors can also be combined in a single invocation of dbt to capture errors from a previous run OR any new or modified models. ```bash -dbt run --select "result:+ state:modified+ --defer --state ./" +dbt run --select result:+ state:modified+ --defer --state ./ ``` ### Fresh rebuilds From 1504ae2df7ab42216aee5eda818fc18c30ef1504 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:54:15 -0600 Subject: [PATCH 3/4] Restore the example command, but remove `--defer` flag (since `dbt ls` does not support it) --- website/docs/reference/node-selection/syntax.md | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index f1a53e71359..c47167efc80 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -111,6 +111,7 @@ Constructing and debugging your selection syntax can be challenging. To get a " dbt ls --select "path/to/my/models" # Lists all models in a specific directory. dbt ls --select "source_status:fresher+" # Shows sources updated since the last dbt source freshness run. dbt ls --select state:modified+ # Displays nodes modified in comparison to a previous state. +dbt ls --select result:+ state:modified+ --state ./ # Lists nodes that match certain [result statuses](/reference/node-selection/syntax#the-result-status) and are modified. ``` From 349fbe296fe7a01afc961eb5605cf4b511bec283 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Tue, 16 Apr 2024 07:44:22 -0600 Subject: [PATCH 4/4] Add quotes around the `--select` arguments --- website/docs/reference/node-selection/syntax.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index c47167efc80..3711ea79314 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -111,7 +111,7 @@ Constructing and debugging your selection syntax can be challenging. To get a " dbt ls --select "path/to/my/models" # Lists all models in a specific directory. dbt ls --select "source_status:fresher+" # Shows sources updated since the last dbt source freshness run. dbt ls --select state:modified+ # Displays nodes modified in comparison to a previous state. -dbt ls --select result:+ state:modified+ --state ./ # Lists nodes that match certain [result statuses](/reference/node-selection/syntax#the-result-status) and are modified. +dbt ls --select "result:+" state:modified+ --state ./ # Lists nodes that match certain [result statuses](/reference/node-selection/syntax#the-result-status) and are modified. ``` @@ -186,7 +186,7 @@ After issuing one of the above commands, you can reference the results by adding ```bash # You can also set the DBT_STATE environment variable instead of the --state flag. -dbt run --select result: --defer --state path/to/prod/artifacts +dbt run --select "result:" --defer --state path/to/prod/artifacts ``` The available options depend on the resource (node) type: @@ -205,7 +205,7 @@ The available options depend on the resource (node) type: The state and result selectors can also be combined in a single invocation of dbt to capture errors from a previous run OR any new or modified models. ```bash -dbt run --select result:+ state:modified+ --defer --state ./ +dbt run --select "result:+" state:modified+ --defer --state ./ ``` ### Fresh rebuilds