From 1b65a40565d5a37ee80903fdce01383f47378369 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Wed, 27 Nov 2024 15:12:26 +1300 Subject: [PATCH 1/3] Update model-notifications --- .../docs/docs/deploy/model-notifications.md | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/deploy/model-notifications.md b/website/docs/docs/deploy/model-notifications.md index a6d4c467f0b..f1563afe0c7 100644 --- a/website/docs/docs/deploy/model-notifications.md +++ b/website/docs/docs/deploy/model-notifications.md @@ -33,7 +33,9 @@ Create configuration YAML files in your project for dbt to send notifications ab ## Configure groups -Add your group configuration in either the `dbt_project.yml` or `groups.yml` file. For example: +Define your groups in any .yml file in your [models directory](/reference/project-configs/model-paths). For example: + + ```yml version: 2 @@ -42,22 +44,26 @@ groups: - name: finance description: "Models related to the finance department" owner: - # 'name' or 'email' is required + # Email is required to receive model-level notifications, additional properties are also allowed. name: "Finance Team" email: finance@dbtlabs.com - slack: finance-data + favorite_food: donuts - name: marketing description: "Models related to the marketing department" owner: name: "Marketing Team" email: marketing@dbtlabs.com - slack: marketing-data + favorite_food: jaffles ``` -## Set up models + + +## Attach groups to models + +Attach groups to models as you would any other config, in either the `dbt_project.yml` or `.yml` files. For example: -Set up your model configuration in either the `dbt_project.yml` or `groups.yml` file; doing this automatically sets up notifications for tests, too. For example: + ```yml version: 2 @@ -74,6 +80,32 @@ models: group: marketing ``` + + +By assigning groups in the `dbt_project.yml` file, you can capture all models in a subdirectory at once. In the below example, all notifications related to staging models will go to the data engineering group, whereas models in `marts/sales` will be routed to the finance team. + + + +```yml +config-version: 2 +name: "jaffle_shop" + +[...] + +models: + jaffle_shop: + staging: + +group: data_engineering + marts: + sales: + +group: finance + campaigns: + +group: marketing + +``` + + +Attaching a group to a model also encompasses its tests, so you will also receive notifications for a model's test failures. ## Enable access to model notifications From a320e28b49485660483db7e5b8a266e23904ae12 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:03:58 +0000 Subject: [PATCH 2/3] Update website/docs/docs/deploy/model-notifications.md --- website/docs/docs/deploy/model-notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/deploy/model-notifications.md b/website/docs/docs/deploy/model-notifications.md index f1563afe0c7..a4e2307ccc7 100644 --- a/website/docs/docs/deploy/model-notifications.md +++ b/website/docs/docs/deploy/model-notifications.md @@ -61,7 +61,7 @@ groups: ## Attach groups to models -Attach groups to models as you would any other config, in either the `dbt_project.yml` or `.yml` files. For example: +Attach groups to models as you would any other config, in either the `dbt_project.yml` or `whatever.yml` files. For example: From 75b24d3f8e530af37b15146122e5526169ff3e76 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:09:32 +0000 Subject: [PATCH 3/3] Update website/docs/docs/deploy/model-notifications.md --- website/docs/docs/deploy/model-notifications.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/docs/deploy/model-notifications.md b/website/docs/docs/deploy/model-notifications.md index a4e2307ccc7..6db67bcf81e 100644 --- a/website/docs/docs/deploy/model-notifications.md +++ b/website/docs/docs/deploy/model-notifications.md @@ -82,7 +82,9 @@ models: ``` -By assigning groups in the `dbt_project.yml` file, you can capture all models in a subdirectory at once. In the below example, all notifications related to staging models will go to the data engineering group, whereas models in `marts/sales` will be routed to the finance team. +By assigning groups in the `dbt_project.yml` file, you can capture all models in a subdirectory at once. + +In this example, model notifications related to staging models go to the data engineering group, `marts/sales` models to the finance team, and `marts/campaigns` models to the marketing team.