Skip to content

Commit

Permalink
Model-level notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
nghi-ly committed Oct 2, 2024
1 parent 29ceb1d commit 5a6439a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
58 changes: 58 additions & 0 deletions website/docs/docs/deploy/model-notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: "Model notifications"
description: "Receive notifications about failures with your models. "
---

# Model notifications <Lifecycle status="beta" />

Set up dbt to notify the appropriate owners &mdash; through Slack, email, or both &mdash; about any failures your models have encountered. When models fail, your reports are no longer accurate and the data can no longer be trusted so it's important to resolve these failures quickly.

To be timely and keep the number of notifications to a reasonable amount, dbt observes the following guidelines when notifying the model owners:

- For the first model that fails, send a notification to each unique model owner. This means that each owner receives only one notification, the initial one.
- Don't send any notifications about subsequent model failures while a dbt job is still running.
- At the end of a job run, send a recap notification that lists all the models that failed where the user is listed as an owner.

Create configuration YAML files in your project for dbt to send notifications about the failures with your models.

## Prerequisites

## Configure groups

```yml
version: 2

groups:
- name: finance
description: "Models related to the finance department"
owner:
# 'name' or 'email' is required
name: "Finance Team"
email: [email protected]
slack: finance-data

- name: marketing
description: "Models related to the marketing department"
owner:
name: "Marketing Team"
email: [email protected]
slack: marketing-data
```
## Set up models
```yml
version: 2

models:
- name: sales
description: "Sales data model"
config:
group: finance

- name: campaigns
description: "Campaigns data model"
config:
group: marketing

```
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ const sidebarSettings = {
"docs/deploy/run-visibility",
"docs/deploy/retry-jobs",
"docs/deploy/job-notifications",
"docs/deploy/model-notifications",
"docs/deploy/webhooks",
"docs/deploy/artifacts",
"docs/deploy/source-freshness",
Expand Down

0 comments on commit 5a6439a

Please sign in to comment.