From 0a45f675a6b114cc8bccb954fd55be770d21b546 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:47:49 -0700 Subject: [PATCH] Fix resource-type (#5935) ## What are you changing in this pull request and why? Fix typo for `resource-type`. - `data_test` should still be `test` - added new example for `test` ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [x] For [docs versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning), review how to [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content). - [x] Need PM review --- .../reference/global-configs/resource-type.md | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/website/docs/reference/global-configs/resource-type.md b/website/docs/reference/global-configs/resource-type.md index eb3562b5175..25ef426a6a7 100644 --- a/website/docs/reference/global-configs/resource-type.md +++ b/website/docs/reference/global-configs/resource-type.md @@ -53,7 +53,7 @@ The available resource types are: - [`semantic_model`](/docs/build/semantic-models) - [`snapshot`](/docs/build/snapshots) - [`source`](/docs/build/sources) -- [`data_test`](/docs/build/data-tests) +- [`test`](/docs/build/data-tests) - [`unit_test`](/docs/build/unit-tests) @@ -64,38 +64,48 @@ Instead of targeting specific resources, use the `--resource-flag` or `--exclude - For example, use the following command to include _all_ snapshots from your dbt build process: - + -```text -dbt build --resource-type snapshot -``` + ```text + dbt build --resource-type snapshot + ``` - + - In this example, run the following command to include _all_ saved queries with the `--resource-type` flag: - + -```text -dbt build --resource-type saved_query -``` + ```text + dbt build --resource-type saved_query + ``` - + -- In this example, use the following command to exclude _all_ unit tests, from your dbt build process. Note that the `--exclude-resource-type` flag is only available in dbt version 1.8 and higher: +- In this example, use the following command to exclude _all_ unit tests from your dbt build process. Note that the `--exclude-resource-type` flag is only available in dbt version 1.8 and higher: + + + + ```text + dbt build --exclude-resource-type unit_test + ``` + + + +- In this example, use the following command to include all data tests in your build process: - + -```text -dbt build --exclude-resource-type unit_test -``` + ```text + dbt build --resource-type test + ``` - +