From 46c2ef375c99c7f86635f42fc23d34c93c34f31f Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Wed, 17 Apr 2024 09:43:20 -0400
Subject: [PATCH 1/3] Adding resource-type flag
---
.../global-configs/about-global-configs.md | 1 +
.../reference/global-configs/resource-type.md | 16 ++++++++++++++++
website/sidebars.js | 1 +
3 files changed, 18 insertions(+)
create mode 100644 website/docs/reference/global-configs/resource-type.md
diff --git a/website/docs/reference/global-configs/about-global-configs.md b/website/docs/reference/global-configs/about-global-configs.md
index 5cc9be25b91..0a75540a9fb 100644
--- a/website/docs/reference/global-configs/about-global-configs.md
+++ b/website/docs/reference/global-configs/about-global-configs.md
@@ -82,6 +82,7 @@ Because the values of `flags` can differ across invocations, we strongly advise
| [profiles_dir](/docs/core/connect-data-platform/connection-profiles#about-profiles) | path | None (current dir, then HOME dir) | ❌ | `DBT_PROFILES_DIR` | `--profiles-dir` | ❌ |
| [project_dir](/reference/dbt_project.yml) | path | | ❌ | `DBT_PROJECT_DIR` | `--project-dir` | ❌ |
| [quiet](/reference/global-configs/logs#suppress-non-error-logs-in-output) | boolean | False | ❌ | `DBT_QUIET` | `--quiet` | ✅ |
+| [resource-type](/reference/global-configs/resource-type) (v1.8+) | string | None | ❌ | `DBT_RESOURCE_TYPES`
`DBT_EXCLUDE_RESOURCE_TYPES` | `--resource-type`
`--exclude-resource-type` | ✅ |
| [send_anonymous_usage_stats](/reference/global-configs/usage-stats) | boolean | True | ✅ | `DBT_SEND_ANONYMOUS_USAGE_STATS` | `--send-anonymous-usage-stats`, `--no-send-anonymous-usage-stats` | ❌ |
| [source_freshness_run_project_hooks](/reference/global-configs/legacy-behaviors#source_freshness_run_project_hooks) | boolean | False | ✅ | ❌ | ❌ | ❌ |
| [state](/reference/node-selection/defer) | path | none | ❌ | `DBT_STATE`, `DBT_DEFER_STATE` | `--state`, `--defer-state` | ❌ |
diff --git a/website/docs/reference/global-configs/resource-type.md b/website/docs/reference/global-configs/resource-type.md
new file mode 100644
index 00000000000..38f5004393c
--- /dev/null
+++ b/website/docs/reference/global-configs/resource-type.md
@@ -0,0 +1,16 @@
+---
+title: "Resource type"
+id: "resource-type"
+sidebar: "resource type"
+---
+
+The `--resource-type` and `--exclude-resource-type` flags are used to include or exclude resource types (such as unit tests) from the dbt `run`, `build`, and `clone` commands.
+
+
+
+```text
+$ dbt build --exclude-resource-type UNIT_TEST_NAME
+
+```
+
+
\ No newline at end of file
diff --git a/website/sidebars.js b/website/sidebars.js
index 71e8afc6ae9..72d0d1ab054 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -975,6 +975,7 @@ const sidebarSettings = {
"reference/global-configs/parsing",
"reference/global-configs/print-output",
"reference/global-configs/record-timing-info",
+ "reference/global-configs/resource-type",
"reference/global-configs/usage-stats",
"reference/global-configs/version-compatibility",
"reference/global-configs/warnings",
From ad7f32cb9801abf8f13ba88f6c0c880f2033880f Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Wed, 17 Apr 2024 09:46:54 -0400
Subject: [PATCH 2/3] Adding migration guide
---
.../docs/docs/dbt-versions/core-upgrade/01-upgrading-to-v1.8.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/website/docs/docs/dbt-versions/core-upgrade/01-upgrading-to-v1.8.md b/website/docs/docs/dbt-versions/core-upgrade/01-upgrading-to-v1.8.md
index d65f7a593a0..5f502984e51 100644
--- a/website/docs/docs/dbt-versions/core-upgrade/01-upgrading-to-v1.8.md
+++ b/website/docs/docs/dbt-versions/core-upgrade/01-upgrading-to-v1.8.md
@@ -87,4 +87,5 @@ The [`run`](/reference/commands/run#the-`--empty`-flag) and [`build`](/reference
- [Global config flags](/reference/global-configs/about-global-configs) are deprecated from the [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file and should be moved to the [`dbt_project.yml`](/reference/dbt_project.yml).
- A new subcategory of flags has been created for [legacy behaviors](/reference/global-configs/legacy-behaviors).
- The [`--indirect_selection`](/reference/global-configs/indirect-selection) flag used with `dbt test` or `dbt build` configures which tests to run for the nodes you specify.
+- New CLI flag [`--resource-type`/`--exclude-resource-type`](/reference/global-configs/resource-type) for including/excluding resources from dbt `build`, `run`, and `clone`.
From 8fafb6c93c8c1217a5b5117165dd11d032d89159 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Wed, 17 Apr 2024 09:49:54 -0400
Subject: [PATCH 3/3] Update
website/docs/reference/global-configs/resource-type.md
---
website/docs/reference/global-configs/resource-type.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/website/docs/reference/global-configs/resource-type.md b/website/docs/reference/global-configs/resource-type.md
index 38f5004393c..db7e47badbd 100644
--- a/website/docs/reference/global-configs/resource-type.md
+++ b/website/docs/reference/global-configs/resource-type.md
@@ -4,7 +4,7 @@ id: "resource-type"
sidebar: "resource type"
---
-The `--resource-type` and `--exclude-resource-type` flags are used to include or exclude resource types (such as unit tests) from the dbt `run`, `build`, and `clone` commands.
+The `--resource-type` and `--exclude-resource-type` flags include or exclude resource types (such as unit tests) from the `dbt run`, `dbt build`, and `dbt clone` commands.