Skip to content

Commit 54eea03

Browse files
authored
Merge pull request elementary-data#538 from elementary-data/Update-documentation-for-alerts-configuration
Update send-slack-alerts.mdx
2 parents a095393 + 6ba0210 commit 54eea03

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

docs/quickstart/send-slack-alerts.mdx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ models:
242242
channel: marketing_data_ops
243243
```
244244

245-
If your models are in folders by department / team, another useful option is to configure the channel in
245+
If your models / tests are in folders by department / team, another useful option is to configure the channel in
246246
your `dbt_project.yml` file.
247247

248248
```yml dbt_project.yml
@@ -251,6 +251,12 @@ models:
251251
+meta:
252252
alerts_config:
253253
channel: marketing_data_ops
254+
255+
tests:
256+
marketing_bi:
257+
+meta:
258+
alerts_config:
259+
channel: marketing_data_ops
254260
```
255261

256262
You can also configure a custom slack channel for a specific test.
@@ -293,14 +299,20 @@ If you configure alert fields on your dbt project, all the test alerts of all of
293299
If you configure alert fields for a model, all the test alerts that belong to this model will display only the configured alert fields.
294300
If you configure alert fields for both a model and a test, the test configured alert fields overrides the model configured alert fields (same as for the dbt project configured alert fields).
295301

296-
To set it up globaly for your project, add the desired alert fields to your models in the `dbt_project.yml` file.
302+
To set it up globaly for your project, add the desired alert fields to your models and tests in the `dbt_project.yml` file.
297303

298304
```yml dbt_project.yml
299305
models:
300306
marketing_leads:
301307
+meta:
302308
alerts_config:
303309
alert_fields: ["description", "owners", "tags", "subscribers"]
310+
311+
tests:
312+
marketing_leads:
313+
+meta:
314+
alerts_config:
315+
alert_fields: ["description", "owners", "tags", "subscribers"]
304316
```
305317

306318
To set it up for a model, add the desired alert fields to your model in the properties.yml
@@ -337,14 +349,21 @@ An alert that has been generated in the suppression interval won't be sent.
337349

338350
`alert_suppression_interval` can accept values of 0-24 - represents the number of hours for which alerts will be skipped (including unrounded numbers).
339351

340-
To set it up globaly for your project, add the alert suppression interval to your models in the `dbt_project.yml` file.
352+
To set it up globaly for your project, add the alert suppression interval to your models and tests in the `dbt_project.yml` file.
341353

342354
```yml dbt_project.yml
343355
models:
344356
marketing_leads:
345357
+meta:
346358
alerts_config:
347359
alert_suppression_interval: 24
360+
361+
362+
tests:
363+
marketing_leads:
364+
+meta:
365+
alerts_config:
366+
alert_suppression_interval: 24
348367
```
349368

350369
To set it up for a model, add the desired alert suppression interval to your model in the properties.yml

0 commit comments

Comments
 (0)