From 6157c7f2793b9488c0d2261cd6450b4728caa461 Mon Sep 17 00:00:00 2001 From: Natalie Fiann Date: Wed, 25 Sep 2024 13:46:03 +0100 Subject: [PATCH 01/20] Updated singular tests section to show they can now be documented --- website/docs/docs/build/data-tests.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 59d716b4ca9..4a137e653b4 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -70,6 +70,30 @@ The name of this test is the name of the file: `assert_total_payment_amount_is_p Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend... + + +### Document singular tests + +Previously, documenting a data test such as a singular data test would result a parsing error. However, in [Versionless](/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can allow setting descriptions in your yaml files to enable you to document singular data tests. + + + +```yml + +# top-level +data_tests: + - name: my_super_cool_singular_test + description: The order_id is unique for every row in the orders model + config: + error_if: ">10" + - name: my_super_cool_singular_test2 + description: '{{ doc("not_null_test") }}' + +``` + + + + ## Generic data tests From 370363f84c705c016ebef8bd6776d0b095e6348f Mon Sep 17 00:00:00 2001 From: nataliefiann <120089939+nataliefiann@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:33:58 +0100 Subject: [PATCH 02/20] Update website/docs/docs/build/data-tests.md Co-authored-by: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 4a137e653b4..04feabe7423 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -74,7 +74,7 @@ Singular data tests are easy to write—so easy that you may find yourself writi ### Document singular tests -Previously, documenting a data test such as a singular data test would result a parsing error. However, in [Versionless](/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can allow setting descriptions in your yaml files to enable you to document singular data tests. +Previously, documenting a data test such as a singular data test would result in a parsing error. However, in [Versionless](/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can set descriptions in your YAML files to document singular data tests. From 7a9dc71b1f5d249357313f711b03f3d44c671eb2 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:23:00 -0600 Subject: [PATCH 03/20] Remove description of previous behavior --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 04feabe7423..f7f7c45a280 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -74,7 +74,7 @@ Singular data tests are easy to write—so easy that you may find yourself writi ### Document singular tests -Previously, documenting a data test such as a singular data test would result in a parsing error. However, in [Versionless](/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can set descriptions in your YAML files to document singular data tests. +You can set descriptions in your YAML files to document singular data tests: From 3b0259211c907574b98cae7cee8ffe18870c6b17 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:55:47 -0600 Subject: [PATCH 04/20] Use a subdirectory in the example for documenting singular data tests --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index f7f7c45a280..b6ec7ac5986 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -76,7 +76,7 @@ Singular data tests are easy to write—so easy that you may find yourself writi You can set descriptions in your YAML files to document singular data tests: - + ```yml From 2d0ad4d2ce6cb8d02128bb17892213e4828ff0c5 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:06:52 -0600 Subject: [PATCH 05/20] Simplify YAML example for descriptions for singular data tests --- website/docs/docs/build/data-tests.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index b6ec7ac5986..11c9c894b9c 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -72,9 +72,9 @@ Singular data tests are easy to write—so easy that you may find yourself writi -### Document singular tests +### Document singular data tests -You can set descriptions in your YAML files to document singular data tests: +The top-level `data_tests:` key in YAML files allows for adding a [`description`](/reference/resource-properties/description) for singular data tests. Descriptions can include Markdown, as well as the [`doc` jinja function](/reference/dbt-jinja-functions/doc). @@ -83,12 +83,7 @@ You can set descriptions in your YAML files to document singular data tests: # top-level data_tests: - name: my_super_cool_singular_test - description: The order_id is unique for every row in the orders model - config: - error_if: ">10" - - name: my_super_cool_singular_test2 - description: '{{ doc("not_null_test") }}' - + description: The `order_id` is unique for every row in the orders model ``` From dadc07beb531565d5e39311139871194b727418e Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:25:10 -0600 Subject: [PATCH 06/20] The `description` property is available for singular data tests beginning in dbt v1.9, so add a tab with a code example --- .../resource-properties/description.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/website/docs/reference/resource-properties/description.md b/website/docs/reference/resource-properties/description.md index 59420614b02..8f1c09ee0d8 100644 --- a/website/docs/reference/resource-properties/description.md +++ b/website/docs/reference/resource-properties/description.md @@ -13,6 +13,7 @@ description: "This guide explains how to use the description key to add YAML des { label: 'Snapshots', value: 'snapshots', }, { label: 'Analyses', value: 'analyses', }, { label: 'Macros', value: 'macros', }, + { label: 'Singular data tests', value: 'singular_data_tests', }, ] }> @@ -145,6 +146,33 @@ macros: + + + + + + +```yml +version: 2 + +data_tests: + - name: singular_data_test_name + description: markdown_string + +``` + + + + + + + +The `description` property is available for [singular data tests](/build/data-tests#singular-data-tests) beginning in dbt v1.9. + + + + + From 30ddc395082b06491dc144023592371a31decfe3 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:41:46 -0600 Subject: [PATCH 07/20] `test-paths` has been added to the default `docs-paths` starting v1.9 --- website/docs/docs/build/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index d040d3c5bef..117d55c225c 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -101,7 +101,7 @@ The events in this table are recorded by [Snowplow](http://github.com/snowplow/s In the above example, a docs block named `table_events` is defined with some descriptive markdown contents. There is nothing significant about the name `table_events` — docs blocks can be named however you like, as long as the name only contains alphanumeric and underscore characters and does not start with a numeric character. ### Placement -Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. ### Usage From 92f9d48abed992b0aae7c9ad2dbaa567bda5f2d3 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:43:57 -0600 Subject: [PATCH 08/20] `test-paths` has been added to the default `docs-paths` starting v1.9 --- website/docs/reference/project-configs/docs-paths.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/project-configs/docs-paths.md b/website/docs/reference/project-configs/docs-paths.md index 51ff5c5ccca..fb3fd76fc3e 100644 --- a/website/docs/reference/project-configs/docs-paths.md +++ b/website/docs/reference/project-configs/docs-paths.md @@ -17,7 +17,7 @@ Optionally specify a custom list of directories where [docs blocks](/docs/build/ ## Default -By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. +By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. ## Example From cf0863bc005864253f2f1d8851680a18af4aa88a Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:53:28 -0600 Subject: [PATCH 09/20] Add version tags for listing of default `docs-paths` --- website/docs/docs/build/documentation.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index 117d55c225c..f15db85f1c0 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -101,8 +101,19 @@ The events in this table are recorded by [Snowplow](http://github.com/snowplow/s In the above example, a docs block named `table_events` is defined with some descriptive markdown contents. There is nothing significant about the name `table_events` — docs blocks can be named however you like, as long as the name only contains alphanumeric and underscore characters and does not start with a numeric character. ### Placement + + + Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. + + + + +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. + + + ### Usage To use a docs block, reference it from your `schema.yml` file with the [doc()](/reference/dbt-jinja-functions/doc) function in place of a markdown string. Using the examples above, the `table_events` docs can be included in the `schema.yml` file as shown below: From 1cf332580e2f0f70310d4a085344a40024b79041 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:54:59 -0600 Subject: [PATCH 10/20] Add version tags for listing of default `docs-paths` --- website/docs/reference/project-configs/docs-paths.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/docs/reference/project-configs/docs-paths.md b/website/docs/reference/project-configs/docs-paths.md index fb3fd76fc3e..11dbe9b413a 100644 --- a/website/docs/reference/project-configs/docs-paths.md +++ b/website/docs/reference/project-configs/docs-paths.md @@ -17,8 +17,18 @@ Optionally specify a custom list of directories where [docs blocks](/docs/build/ ## Default + + + By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. + + + + +By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. + + ## Example From da74ea3cd695b8bce2a3022efc06ec6466427e7f Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:59:49 -0600 Subject: [PATCH 11/20] For v1.8 and earlier, call out that this is available in v1.9 --- website/docs/docs/build/data-tests.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 11c9c894b9c..5d82fdf4125 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -68,12 +68,12 @@ having total_amount < 0 The name of this test is the name of the file: `assert_total_payment_amount_is_positive`. Simple enough. -Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend... - - +Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend [generic data tests](#generic-data-tests). ### Document singular data tests + + The top-level `data_tests:` key in YAML files allows for adding a [`description`](/reference/resource-properties/description) for singular data tests. Descriptions can include Markdown, as well as the [`doc` jinja function](/reference/dbt-jinja-functions/doc). @@ -90,6 +90,12 @@ data_tests: + + +The `description` property is available for [singular data tests](/build/data-tests#singular-data-tests) beginning in dbt v1.9. + + + ## Generic data tests Certain data tests are generic: they can be reused over and over again. A generic data test is defined in a `test` block, which contains a parametrized query and accepts arguments. It might look like: From 8c5ed447904b4258944024be52f46a0902bca68a Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:28:52 +0100 Subject: [PATCH 12/20] Update website/docs/docs/build/documentation.md --- website/docs/docs/build/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index f15db85f1c0..16b6901b48b 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -104,7 +104,7 @@ In the above example, a docs block named `table_events` is defined with some des -Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. From 75d7a81ccaf1a38c94b412842a7b3946a3251282 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:29:31 +0100 Subject: [PATCH 13/20] Update website/docs/docs/build/documentation.md --- website/docs/docs/build/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index 16b6901b48b..9b852d9f552 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -110,7 +110,7 @@ Docs blocks should be placed in files with a `.md` file extension. By default, d -Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. From e613ffcfd47f399c0aded5a05797064bb9ac3ce6 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:30:05 +0100 Subject: [PATCH 14/20] Update website/docs/docs/build/documentation.md --- website/docs/docs/build/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index 9b852d9f552..9f807596b58 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -104,7 +104,7 @@ In the above example, a docs block named `table_events` is defined with some des -Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths), and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. From fe65d382476eea89ec6d7ae6c88d209aa08eb4da Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:30:21 +0100 Subject: [PATCH 15/20] Update website/docs/docs/build/documentation.md --- website/docs/docs/build/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/documentation.md b/website/docs/docs/build/documentation.md index 9f807596b58..6f7c6c27f31 100644 --- a/website/docs/docs/build/documentation.md +++ b/website/docs/docs/build/documentation.md @@ -110,7 +110,7 @@ Docs blocks should be placed in files with a `.md` file extension. By default, d -Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. +Docs blocks should be placed in files with a `.md` file extension. By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths), and [snapshot-paths](/reference/project-configs/snapshot-paths)) — you can adjust this behavior using the [docs-paths](/reference/project-configs/docs-paths) config. From 65e9cf8515f8c1b82dd9990a98a0172372750b95 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:30:58 +0100 Subject: [PATCH 16/20] Update docs-paths.md --- website/docs/reference/project-configs/docs-paths.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/project-configs/docs-paths.md b/website/docs/reference/project-configs/docs-paths.md index 11dbe9b413a..5481c19c9fd 100644 --- a/website/docs/reference/project-configs/docs-paths.md +++ b/website/docs/reference/project-configs/docs-paths.md @@ -20,13 +20,13 @@ Optionally specify a custom list of directories where [docs blocks](/docs/build/ -By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. +By default, dbt will search in all resource paths for docs blocks (for example, the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [test-paths](/reference/project-configs/test-paths), [macro-paths](/reference/project-configs/macro-paths), and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. -By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths) and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. +By default, dbt will search in all resource paths for docs blocks (i.e. the combined list of [model-paths](/reference/project-configs/model-paths), [seed-paths](/reference/project-configs/seed-paths), [analysis-paths](/reference/project-configs/analysis-paths), [macro-paths](/reference/project-configs/macro-paths), and [snapshot-paths](/reference/project-configs/snapshot-paths)). If this option is configured, dbt will _only_ look in the specified directory for docs blocks. From 7912247b48a8beed545039db86dabaa2a3bdf74c Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:35:39 +0100 Subject: [PATCH 17/20] Update website/docs/reference/resource-properties/description.md --- website/docs/reference/resource-properties/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-properties/description.md b/website/docs/reference/resource-properties/description.md index 8f1c09ee0d8..5f921bcde5b 100644 --- a/website/docs/reference/resource-properties/description.md +++ b/website/docs/reference/resource-properties/description.md @@ -167,7 +167,7 @@ data_tests: -The `description` property is available for [singular data tests](/build/data-tests#singular-data-tests) beginning in dbt v1.9. +The `description` property is available for [singular data tests](/build/data-tests#document-singular-data-tests) beginning in dbt v1.9. From 1a39a150715a31237e406ef9ca6194421fe8cb41 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:42:51 +0100 Subject: [PATCH 18/20] Update website/docs/docs/build/data-tests.md --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 5d82fdf4125..fcb32858e69 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -92,7 +92,7 @@ data_tests: -The `description` property is available for [singular data tests](/build/data-tests#singular-data-tests) beginning in dbt v1.9. +The `description` property is available for [singular data tests](/build/data-tests#document-singular-data-tests) beginning in dbt v1.9. From ff629ca69223d254e8f7af4bc890ba477c7f5895 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Tue, 1 Oct 2024 09:08:35 -0600 Subject: [PATCH 19/20] Restore original --- website/docs/docs/build/data-tests.md | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 4083b189c3c..ae3ac9225db 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -68,34 +68,7 @@ having total_amount < 0 The name of this test is the name of the file: `assert_total_payment_amount_is_positive`. Simple enough. -Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend [generic data tests](#generic-data-tests). - -### Document singular data tests - - - -The top-level `data_tests:` key in YAML files allows for adding a [`description`](/reference/resource-properties/description) for singular data tests. Descriptions can include Markdown, as well as the [`doc` jinja function](/reference/dbt-jinja-functions/doc). - - - -```yml - -# top-level -data_tests: - - name: my_super_cool_singular_test - description: The `order_id` is unique for every row in the orders model -``` - - - - - - - -The `description` property is available for [singular data tests](/build/data-tests#document-singular-data-tests) beginning in dbt v1.9. - - - +Singular data tests are easy to write—so easy that you may find yourself writing the same basic structure over and over, only changing the name of a column or model. By that point, the test isn't so singular! In that case, we recommend... ## Generic data tests Certain data tests are generic: they can be reused over and over again. A generic data test is defined in a `test` block, which contains a parametrized query and accepts arguments. It might look like: From 85843a8cba00556ae1649a5f3ead4245618c6724 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:29:29 +0100 Subject: [PATCH 20/20] Update website/docs/reference/resource-properties/description.md --- website/docs/reference/resource-properties/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-properties/description.md b/website/docs/reference/resource-properties/description.md index 5f921bcde5b..6f32f75efa4 100644 --- a/website/docs/reference/resource-properties/description.md +++ b/website/docs/reference/resource-properties/description.md @@ -167,7 +167,7 @@ data_tests: -The `description` property is available for [singular data tests](/build/data-tests#document-singular-data-tests) beginning in dbt v1.9. +The `description` property is available for singular data tests beginning in dbt v1.9.