Skip to content

Commit

Permalink
Model-level notifications (#6218)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Beta docs for model-level notifications 

- [x] New page 
- [x] Update sidebar so new page is below Job notifications page
- [x] Add feature card to two landing pages

## Checklist
- [x] I have reviewed the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [x] The topic I'm writing about is for specific dbt version(s) and I
have versioned it according to the [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and/or [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content)
guidelines.
- [x] Needs PM review

ADDING PAGE (if so, uncomment):
- [x] Add/remove page in `website/sidebars.js`
- [x] Provide a unique filename for new pages

<!-- vercel-deployment-preview -->
---
🚀 Deployment available! Here are the direct links to the updated files:


-
https://docs-getdbt-com-git-ly-docs-beta-model-notifications-dbt-labs.vercel.app/docs/deploy/deployment-overview
-
https://docs-getdbt-com-git-ly-docs-beta-model-notifications-dbt-labs.vercel.app/docs/deploy/model-notifications
-
https://docs-getdbt-com-git-ly-docs-beta-model-notifications-dbt-labs.vercel.app/docs/deploy/monitor-jobs

<!-- end-vercel-deployment-preview -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent 0604cd5 commit 26b663a
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/docs/docs/deploy/deployment-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ Learn how to use dbt Cloud's features to help your team ship timely and quality
link="/docs/deploy/job-notifications"
icon="dbt-bit"/>

<Card
title="Model notifications"
body="Receive email notifications in real time about issues encountered by your models and tests while a job is running. "
link="/docs/deploy/model-notifications"
icon="dbt-bit"/>

<Card
title="Webhooks"
body="Create outbound webhooks to send events about your dbt jobs' statuses to other systems in your organization."
Expand Down
87 changes: 87 additions & 0 deletions website/docs/docs/deploy/model-notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: "Model notifications"
description: "While a job is running, receive email notifications in real time about any issues with your models and tests. "
---

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

Set up dbt to notify the appropriate model owners through email about issues as soon as they occur, while the job is still running. Model owners can specify which statuses to receive notifications about:

- `Success` and `Fails` for models
- `Warning`, `Success`, and `Fails` for tests

With model-level notifications, model owners can be the first ones to know about issues before anyone else (like the stakeholders).

:::info Beta feature

This feature is currently available in [beta](/docs/dbt-versions/product-lifecycles#dbt-cloud) to a limited group of users and is gradually being rolled out. If you're in the beta, please contact the Support team at support@getdbt.com for assistance or questions.

:::

To be timely and keep the number of notifications to a reasonable amount when multiple models or tests trigger them, dbt observes the following guidelines when notifying the owners:

- Send a notification to each unique owner/email during a job run about any models (with status of failure/success) or tests (with status of warning/failure/success). Each owner receives only one notification, the initial one.
- Don't send any notifications about subsequent models or tests while a dbt job is still running.
- At the end of a job run, each owner receives a notification, for each of the statuses they specified to be notified about, with a list of models and tests that have that status.

Create configuration YAML files in your project for dbt to send notifications about the status of your models and tests.

## Prerequisites
- Your dbt Cloud administrator has [enabled the appropriate account setting](#enable-access-to-model-notifications) for you.
- Your environment(s) must be on ["Versionless"](/docs/dbt-versions/versionless-cloud).


## Configure groups

Add your group configuration in either the `dbt_project.yml` or `groups.yml` file. For example:

```yml
version: 2

groups:
- name: finance
description: "Models related to the finance department"
owner:
# 'name' or 'email' is required
name: "Finance Team"
email: finance@dbtlabs.com
slack: finance-data

- name: marketing
description: "Models related to the marketing department"
owner:
name: "Marketing Team"
email: marketing@dbtlabs.com
slack: marketing-data
```
## Set up models
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
models:
- name: sales
description: "Sales data model"
config:
group: finance
- name: campaigns
description: "Campaigns data model"
config:
group: marketing
```

## Enable access to model notifications

Provide dbt Cloud account members the ability to configure and receive alerts about issues with models or tests that are encountered during job runs.

To use model-level notifications, your dbt Cloud account must have access to the feature. Ask your dbt Cloud administrator to enable this feature for account members by following these steps:

1. Navigate to **Notification settings** from your profile name in the sidebar (lower left-hand side).
1. From **Email notications**, enable the setting **Enable group/owner notifications on models** under the **Model notifications** section. Then, specify which statuses to receive notifications about (Success, Warning, and/or Fails).

<Lightbox src="/img/docs/dbt-cloud/example-enable-model-notifications.png" title="Example of the setting Enable group/owner notifications on models" />
1 change: 1 addition & 0 deletions website/docs/docs/deploy/monitor-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This portion of our documentation will go over dbt Cloud's various capabilities
- [Run visibility](/docs/deploy/run-visibility) &mdash; View your run history to help identify where improvements can be made to scheduled jobs.
- [Retry jobs](/docs/deploy/retry-jobs) &mdash; Rerun your errored jobs from start or the failure point.
- [Job notifications](/docs/deploy/job-notifications) &mdash; Receive email or Slack notifications when a job run succeeds, encounters warnings, fails, or is canceled.
- [Model notifications](/docs/deploy/model-notifications)<Lifecycle status="beta"/> &mdash; Receive email notifications about any issues encountered by your models and tests as soon as they occur while running a job.
- [Webhooks](/docs/deploy/webhooks) &mdash; Use webhooks to send events about your dbt jobs' statuses to other systems.
- [Leverage artifacts](/docs/deploy/artifacts) &mdash; dbt Cloud generates and saves artifacts for your project, which it uses to power features like creating docs for your project and reporting freshness of your sources.
- [Source freshness](/docs/deploy/source-freshness) &mdash; Monitor data governance by enabling snapshots to capture the freshness of your data sources.
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 26b663a

Please sign in to comment.