Skip to content
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

Merged
merged 7 commits into from
Nov 27, 2024
Merged

Update model-notifications #6556

merged 7 commits into from
Nov 27, 2024

Conversation

joellabes
Copy link
Contributor

@joellabes joellabes commented Nov 27, 2024

What are you changing in this pull request and why?

  • The main thing I wanted to do was clarify that you can't define a new group in dbt_project.yml.
  • I also removed the Slack handle since we don't currently support Slack notifications and I thought that might be confusing (I also don't know whether we'll capture channel name or channel ID when we do support Slack, so didn't want people to pre-populate the wrong information).
  • After that, I also provided sample code for assigning groups to models in dbt_project.yml

🚀 Deployment available! Here are the direct links to the updated files:

@joellabes joellabes requested a review from a team as a code owner November 27, 2024 02:15
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-getdbt-com 🛑 Canceled (Inspect) Nov 27, 2024 5:16pm

@github-actions github-actions bot added content Improvements or additions to content size: small This change will take 1 to 2 days to address and removed content Improvements or additions to content labels Nov 27, 2024
@@ -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:
Copy link
Contributor Author

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

Comment on lines +47 to +57
# 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good callout! i assumed slack was supported when reading

Comment on lines 60 to 66
</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'>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of this is purely additive and you can rework as you see fit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding the files tag! 🙏

Comment on lines 83 to 108
</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.

<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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is this

Copy link
Contributor

@mirnawong1 mirnawong1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great to me and thanks for adjusting this @joellabes , made some small tweaks for clarity and merging for you!

@mirnawong1 mirnawong1 merged commit 2591d73 into current Nov 27, 2024
9 checks passed
@mirnawong1 mirnawong1 deleted the joellabes-patch-4 branch November 27, 2024 17:16
Copy link
Contributor

Check your created Crawler

Check your created index on your Algolia Application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: small This change will take 1 to 2 days to address trigger-crawl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants