From 6a0e0128de1f51bddcca32e0220a227cef5e174b Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:57:34 -0400 Subject: [PATCH 1/3] [Draft] Update data test descriptions --- website/docs/docs/build/data-tests.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index b4f25a3d111..e1ea7c247ad 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -267,6 +267,14 @@ where {{ column_name }} is null + + +## Document data test descriptions + +The details of data tests are available to view in dbt Explorer (Cloud) or by executing `dbt docs generate` and `dbt docs view` (Core). In addition to general details such as date, time run, and last run status, you can add a custom description using the `description` configuration in project .yml files. The description field can contain plain text or macro configurations and can be added to the `/test` directory in a .yml file (for example, `schema.yml`). Additionally, if you add the `description` config to the test in a model's .yml file, it will be documented as well. + + + ## Storing test failures Normally, a data test query will calculate failures as part of its execution. If you set the optional `--store-failures` flag, the [`store_failures`](/reference/resource-configs/store_failures), or the [`store_failures_as`](/reference/resource-configs/store_failures_as) configs, dbt will first save the results of a test query to a table in the database, and then query that table to calculate the number of failures. From 6b8fe2e11bcc45552cc3419a6680fac8e70c8e85 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:59:23 -0400 Subject: [PATCH 2/3] Editorial changes --- 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 e1ea7c247ad..54f8d31dc37 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -271,7 +271,7 @@ where {{ column_name }} is null ## Document data test descriptions -The details of data tests are available to view in dbt Explorer (Cloud) or by executing `dbt docs generate` and `dbt docs view` (Core). In addition to general details such as date, time run, and last run status, you can add a custom description using the `description` configuration in project .yml files. The description field can contain plain text or macro configurations and can be added to the `/test` directory in a .yml file (for example, `schema.yml`). Additionally, if you add the `description` config to the test in a model's .yml file, it will be documented as well. +The details of data tests are available to view in dbt Explorer (Cloud) or by executing `dbt docs generate` and `dbt docs view` (Core). In addition to general details such as date, time run, and last run status, you can add a custom description using the `description` configuration in project .yml files. The description field can contain plain text or macro configurations and can be added to the `/test` directory in a .yml file (for example, `schema.yml`). Additionally, it will be documented if you add the `description` config to the test in a model's .yml file. From 666289c8e5abe05c838d96536b27cad41649d630 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:35:50 -0400 Subject: [PATCH 3/3] Updating for all data tests --- website/docs/docs/build/data-tests.md | 8 -------- .../docs/reference/resource-properties/description.md | 11 +++++------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index 54f8d31dc37..b4f25a3d111 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -267,14 +267,6 @@ where {{ column_name }} is null - - -## Document data test descriptions - -The details of data tests are available to view in dbt Explorer (Cloud) or by executing `dbt docs generate` and `dbt docs view` (Core). In addition to general details such as date, time run, and last run status, you can add a custom description using the `description` configuration in project .yml files. The description field can contain plain text or macro configurations and can be added to the `/test` directory in a .yml file (for example, `schema.yml`). Additionally, it will be documented if you add the `description` config to the test in a model's .yml file. - - - ## Storing test failures Normally, a data test query will calculate failures as part of its execution. If you set the optional `--store-failures` flag, the [`store_failures`](/reference/resource-configs/store_failures), or the [`store_failures_as`](/reference/resource-configs/store_failures_as) configs, dbt will first save the results of a test query to a table in the database, and then query that table to calculate the number of failures. diff --git a/website/docs/reference/resource-properties/description.md b/website/docs/reference/resource-properties/description.md index 6f32f75efa4..cf7b2b29a5a 100644 --- a/website/docs/reference/resource-properties/description.md +++ b/website/docs/reference/resource-properties/description.md @@ -13,7 +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', }, + { label: 'Data tests', value: 'data_tests', }, ] }> @@ -146,17 +146,17 @@ macros: - + - + ```yml version: 2 data_tests: - - name: singular_data_test_name + - name: data_test_name description: markdown_string ``` @@ -167,13 +167,12 @@ data_tests: -The `description` property is available for singular data tests beginning in dbt v1.9. +The `description` property is available for generic and singular data tests beginning in dbt v1.9. - ## Definition