-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update model-notifications #6556
Changes from 4 commits
1b65a40
13550d9
7115402
a320e28
75b24d3
f2a040a
e855429
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
||
<File name='models/groups.yml'> | ||
|
||
```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: [email protected] | ||
slack: finance-data | ||
favorite_food: donuts | ||
|
||
- name: marketing | ||
description: "Models related to the marketing department" | ||
owner: | ||
name: "Marketing Team" | ||
email: [email protected] | ||
slack: marketing-data | ||
favorite_food: jaffles | ||
Comment on lines
+47
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for clarity and is optional, but reduces the likelihood people misbelieve that Slack notifs are supported There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good callout! i assumed slack was supported when reading |
||
``` | ||
|
||
## Set up models | ||
</File> | ||
|
||
## Attach groups to models | ||
|
||
Attach groups to models as you would any other config, in either the `dbt_project.yml` or `whatever.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: | ||
<File name='models/marts.yml'> | ||
|
||
```yml | ||
version: 2 | ||
|
@@ -74,6 +80,32 @@ models: | |
group: marketing | ||
|
||
``` | ||
</File> | ||
|
||
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. | ||
mirnawong1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<File name='dbt_project.yml'> | ||
|
||
```yml | ||
config-version: 2 | ||
name: "jaffle_shop" | ||
|
||
[...] | ||
|
||
models: | ||
jaffle_shop: | ||
staging: | ||
+group: data_engineering | ||
marts: | ||
sales: | ||
+group: finance | ||
campaigns: | ||
+group: marketing | ||
|
||
``` | ||
|
||
</File> | ||
Attaching a group to a model also encompasses its tests, so you will also receive notifications for a model's test failures. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As is this |
||
|
||
## Enable access to model notifications | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong and is the main thing I wanted to do in the PR