diff --git a/doc/user/content/manage/dbt/_index.md b/doc/user/content/manage/dbt/_index.md index ba93e56839371..7a1505f4ab9d7 100644 --- a/doc/user/content/manage/dbt/_index.md +++ b/doc/user/content/manage/dbt/_index.md @@ -555,11 +555,11 @@ non-stop, and monitor failures as soon as they happen. This is useful for unit testing during the development of your dbt models, and later in production to trigger **real-time alerts** downstream. -1. To configure your project for continuous testing, add a `tests` property to +1. To configure your project for continuous testing, add a `data_tests` property to `dbt_project.yml` with the `store_failures` configuration: ```yaml - tests: + data_tests: dbt_project.name: models: +store_failures: true @@ -574,7 +574,7 @@ trigger **real-time alerts** downstream. **Note:** As an alternative, you can specify the `--store-failures` flag when running `dbt test`. -1. Add tests to your models using the `tests` property in the model +1. Add tests to your models using the `data_tests` property in the model configuration `.yml` files: ```yaml @@ -584,7 +584,7 @@ trigger **real-time alerts** downstream. columns: - name: col_a description: 'column a description' - tests: + data_tests: - not_null - unique ``` diff --git a/misc/dbt-materialize/dbt/include/starter_project/dbt_project.yml b/misc/dbt-materialize/dbt/include/starter_project/dbt_project.yml index 6fb8ee8fd4e1f..36a6c2a3b0000 100644 --- a/misc/dbt-materialize/dbt/include/starter_project/dbt_project.yml +++ b/misc/dbt-materialize/dbt/include/starter_project/dbt_project.yml @@ -25,7 +25,7 @@ clean-targets: - "target" - "dbt_packages" -tests: +data_tests: {project_name}: +store_failures: true +schema: 'etl_failure' diff --git a/misc/dbt-materialize/dbt/include/starter_project/models/example/schema.yml b/misc/dbt-materialize/dbt/include/starter_project/models/example/schema.yml index ee42e4568b8e4..6f287367095b8 100644 --- a/misc/dbt-materialize/dbt/include/starter_project/models/example/schema.yml +++ b/misc/dbt-materialize/dbt/include/starter_project/models/example/schema.yml @@ -23,7 +23,7 @@ models: columns: - name: seller description: "The seller for an auction" - tests: + data_tests: - unique - not_null - name: seller_item @@ -40,7 +40,7 @@ models: columns: - name: id description: "The id of the buyer or seller" - tests: + data_tests: - not_null - name: credits description: "Credit from an auction" @@ -52,7 +52,7 @@ models: columns: - name: id description: "The primary key of the auction" - tests: + data_tests: - unique - not_null - name: buyer @@ -73,7 +73,7 @@ models: columns: - name: id description: "The primary key for this table" - tests: + data_tests: - unique - not_null @@ -82,6 +82,6 @@ models: columns: - name: id description: "The primary key for this table" - tests: + data_tests: - unique - not_null