.yml files. The supported attributes are: owner, subscribers, description, tags.
You can configure and customize your alerts by configuring:
- suppression interval
- alert fields (for test alerts only)
- alert grouping
- alert filters
Alert properties in .yml files
Elementary prioritizes configuration in the following order:
For models / sources:
- Model config block.
- Model properties.
- Model path configuration under
modelskey indbt_project.yml.
- Test properties.
- Tests path configuration under
testskey indbt_project.yml. - Parent model configuration.
dbt_project.yml
Alert content
Owner
Elementary enriches alerts with owners for models or tests).- If you want the owner to be tagged on slack use ’@’ and the email prefix of the slack user (@jessica.jones to tag jessica.jones@marvel.com).
- You can configure a single owner or a list of owners (
["@jessica.jones", "@joe.joseph"]).
- models
- test
- test/model config block
- dbt_project.yml
Subscribers
If you want additional users besides the owner to be tagged on an alert, add them as subscribers.- If you want the subscriber to be tagged on slack use ’@’ and the email prefix of the slack user (@jessica.jones to tag jessica.jones@marvel.com).
- You can configure a single subscriber or a list (
["@jessica.jones", "@joe.joseph"]).
- model
- test
- test/model config block
- dbt_project.yml
Test description
Elementary supports configuring description for tests that are included in alerts. It’s recommended to add an explanation of what does it mean if this test fails, so alert will include this context.- test
- test config block
- dbt_project.yml
Tags
You can use tags to provide context to your alerts.- You can tag a group or a channel in a slack alert by adding
#channel_nameas a tag. - Tags are aggregated,so a test alert will include both the test and the parent model tags.
- model
- test
- test/model config block
- dbt_project.yml
Alerts distribution
Elementary allows you to customize alerts to distribute the right information to the right people. This way you can ensure your alerts are valuable and avoid alert fatigue.Suppression interval
Don’t want to get multiple alerts if the same test keeps failing? You can now configure analert_suppression_interval, this is a “snooze” period for alerts on the same issue.
The accepted value is in hours, so 1 day snooze is alert_suppression_interval: 24. Elementary won’t send new alerts on the same issue that are generated within suppression interval.
Note: if you configure a suppression interval using this method, it will override the value in the global configuration.
- model
- test
- test/model config block
- dbt_project.yml
Group alerts by table
By default, Elementary sends a single alert to notify on each failure with extensive information for fast triage. Elementary also supports grouping alerts by table. In this case, a single Slack notification will be generated containing all issues associated with this table. The created notification will contain a union of the relevant owners, tags and subscribers. Due to their nature, grouped alerts will contain less information on each issue.- model
- test
- test/model config block
- dbt_project.yml
Alert fields
You can decide which fields to include in the alert, and create a format of alert that fits your use case and recipients.By default, all the fields are included in the alert. Supported alert fields:
table: Displays the table name of the testcolumn: Displays the column name of the testdescription: Displays the description of the testowners: Displays the owners of the model on which the test is runningtags: Displays the dbt tags of the test/modelsubscribers: Displays the subscribers of the test/modelresult_message: Displays the returned message from the test resulttest_parameters: Displays the parameters that were provided to the testtest_query: Displays the query of the testtest_results_sample: Displays a sample of the test results
- model
- test
- test/model config block
- dbt_project.yml
Alerts CLI flags
Filter alerts
Elementary supports filtering the alerts by tag, owner, model, status or resource type. Using filters, you can send alerts to the relevant people and teams by runningedr multiple times with different filters on each run.
- owners filter
- models filter
- statuses filter
- resource_types filter
--filters flag can be used multiple times to apply multiple filters. The filters are combined using the logical AND operator. The comma , is used to separate multiple values for the same filter, creating a logical OR.
- multiple filters
Group alerts by table
By default, Elementary sends a single alert to notify on each failure with extensive information for fast triage. Elementary also supports grouping alerts by table. In this case, a single Slack notification will be generated containing all issues associated with this table. The created notification will contain a union of the relevant owners, tags and subscribers. Due to their nature, grouped alerts will contain less information on each issue.Suppression interval flag
Don’t want to get multiple alerts if the same test keeps failing? You can now configure an alert_suppression_interval, this is a “snooze” period for alerts on the same issue. Elementary won’t send new alerts on the same issue that are generated within suppression interval. The flag configuration is the suppression interval duration in hours, and the default is 0 hours (no alert suppression). If configured otherwise in the dbt project config block or meta, the CLI value will be ignored (unless--override-dbt-project-config is used).