From c28fcefba58b69c437c9341e2130cfb30302cf8a Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Wed, 28 Feb 2024 16:27:29 -0500
Subject: [PATCH 01/10] Data_tests callout
---
website/docs/docs/build/data-tests.md | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md
index 0806842a85c..b15dd58dafe 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -13,6 +13,29 @@ keywords:
* [Data test configurations](/reference/data-test-configs)
* [Test selection examples](/reference/node-selection/test-selection-examples)
+
+
+:::important
+
+With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. Please update your configuration YML to prepare for these changes:
+
+```yml
+
+models:
+
+name: orders
+columns:
+name: order_id
+data_tests:
+unique
+not_null
+
+```
+
+:::
+
+
+
## Overview
Data tests are assertions you make about your models and other resources in your dbt project (e.g. sources, seeds and snapshots). When you run `dbt test`, dbt will tell you if each test in your project passes or fails.
From 152396929ab64c8507a1575bc2fad979b3e3bc7f Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 12:03:22 -0500
Subject: [PATCH 02/10] Updating text
---
website/docs/docs/build/data-tests.md | 38 +++++++++++++++++----------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md
index b15dd58dafe..f7665b4f359 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -17,20 +17,7 @@ keywords:
:::important
-With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. Please update your configuration YML to prepare for these changes:
-
-```yml
-
-models:
-
-name: orders
-columns:
-name: order_id
-data_tests:
-unique
-not_null
-
-```
+With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-syntax) for more information.
:::
@@ -274,6 +261,29 @@ Note that, if you select to store test failures:
* Test result tables are created in a schema suffixed or named `dbt_test__audit`, by default. It is possible to change this value by setting a `schema` config. (For more details on schema naming, see [using custom schemas](/docs/build/custom-schemas).)
- A test's results will always **replace** previous failures for the same test.
+
+
+## New `tests:` syntax
+
+With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`.
+
+As we progress towards this deprecation, the examples in our docs pages will be updated to reflect this new syntax, but we highly recommend you begin the migration process as soon as you upgrade to v1.8 to avoid interruptions or issues in the future.
+
+```yml
+
+models:
+
+name: orders
+columns:
+name: order_id
+data_tests:
+unique
+not_null
+
+
+```
+
+
## FAQs
From 292781db288dc5d645a9ffbc1580df2dae4a449e Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 12:04:16 -0500
Subject: [PATCH 03/10] 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 f7665b4f359..545b9d8c04e 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -17,7 +17,7 @@ keywords:
:::important
-With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-syntax) for more information.
+With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-`tests:`-syntax) for more information.
:::
From f24dc17832e211751ae3eb4eb517b139c2aa5823 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 16:09:15 -0500
Subject: [PATCH 04/10] 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 545b9d8c04e..cf276e41f62 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -17,7 +17,7 @@ keywords:
:::important
-With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-`tests:`-syntax) for more information.
+With the addition of unit tests in dbt v1.8, what was previously called "tests" are now "data tests". In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias for data tests but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-`tests:`-syntax) for more information.
:::
From 2652f2153a64ce55644c081617a04cdc64ed4e80 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 16:11:17 -0500
Subject: [PATCH 05/10] 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 cf276e41f62..2bfcf604116 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -265,7 +265,7 @@ Note that, if you select to store test failures:
## New `tests:` syntax
-With the addition of unit tests in dbt v1.8, `tests` are now `data tests`. In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`.
+Data tests were historically called "tests" in dbt as the only form of testing available. With the introduction of unit tests in v1.8, it was necessary to update our naming conventions and syntax. As of v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`.
As we progress towards this deprecation, the examples in our docs pages will be updated to reflect this new syntax, but we highly recommend you begin the migration process as soon as you upgrade to v1.8 to avoid interruptions or issues in the future.
From 26ec3b091607776943e9a25ad81d2b635ab9caa7 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 16:21:49 -0500
Subject: [PATCH 06/10] 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 2bfcf604116..260e1026092 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -17,7 +17,7 @@ keywords:
:::important
-With the addition of unit tests in dbt v1.8, what was previously called "tests" are now "data tests". In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias for data tests but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-`tests:`-syntax) for more information.
+With the addition of unit tests in dbt v1.8, what was previously called "tests" are now "data tests". In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias for data tests but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-tests-syntax) for more information.
:::
From 881ca9924e520d95e0fb47513376f233480d4bcb Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 17:04:13 -0500
Subject: [PATCH 07/10] 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 260e1026092..c3a654d5eb3 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -261,7 +261,7 @@ Note that, if you select to store test failures:
* Test result tables are created in a schema suffixed or named `dbt_test__audit`, by default. It is possible to change this value by setting a `schema` config. (For more details on schema naming, see [using custom schemas](/docs/build/custom-schemas).)
- A test's results will always **replace** previous failures for the same test.
-
+
## New `tests:` syntax
From a7e503bf43c31579ee6d6f990d2f6a8ef94e8c35 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 18:41:00 -0500
Subject: [PATCH 08/10] 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 c3a654d5eb3..65812c12a5f 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -17,7 +17,7 @@ keywords:
:::important
-With the addition of unit tests in dbt v1.8, what was previously called "tests" are now "data tests". In dbt v1.8, `tests:` is still supported in your YML configuration file as an alias for data tests but will be deprecated in the future in favor of `data_tests:`. See [New syntax](#new-tests-syntax) for more information.
+In dbt v1.8, what was previously known as "tests" are now called "data tests" with the addition of [unit tests](/docs/build/unit-tests). The YAML key `tests:` is still supported as an alias for data tests but will be deprecated in the future in favor of `data_tests:`. Refer to [New syntax](#new-tests-syntax) for more information.
:::
From 4c0d4df9b357fe3450b9413e7f2508c243bd2bb7 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 19:10:42 -0500
Subject: [PATCH 09/10] Update data-tests.md
---
website/docs/docs/build/data-tests.md | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md
index 65812c12a5f..eff8f9e2b70 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -272,13 +272,12 @@ As we progress towards this deprecation, the examples in our docs pages will be
```yml
models:
-
-name: orders
-columns:
-name: order_id
-data_tests:
-unique
-not_null
+ - name: orders
+ columns:
+ - name: order_id
+ data_tests:
+ - unique
+ - not_null
```
From 178b870b011b99c0f5f52fdf5f74114df4b28e05 Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 29 Feb 2024 19:11:00 -0500
Subject: [PATCH 10/10] Update website/docs/docs/build/data-tests.md
Co-authored-by: Grace Goheen <53586774+graciegoheen@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 eff8f9e2b70..0261ea2d8b2 100644
--- a/website/docs/docs/build/data-tests.md
+++ b/website/docs/docs/build/data-tests.md
@@ -263,7 +263,7 @@ Note that, if you select to store test failures:
-## New `tests:` syntax
+## New `data_tests:` syntax
Data tests were historically called "tests" in dbt as the only form of testing available. With the introduction of unit tests in v1.8, it was necessary to update our naming conventions and syntax. As of v1.8, `tests:` is still supported in your YML configuration file as an alias but will be deprecated in the future in favor of `data_tests:`.