You can enrich your alerts by adding properties to tests, models and sources in your .yml files.
The supported attributes are: owner,
subscribers,
description,
tags.
You can configure and customize your alerts by configuring: custom channel, suppression interval, alert fields(for test alerts only), alert grouping, alert filters.
Elementary prioritizes configuration in the following order:
For models / sources:
- Model config block.
- Model properties.
- Model path configuration under
modelskey indbt_project.yml.
For tests:
- Test properties.
- Tests path configuration under
testskey indbt_project.yml. - Parent model configuration.
{/* prettier-ignore */}
meta:
owner: "@jessica.jones"
subscribers: ["@jessica.jones", "@joe.joseph"]
description: "This is the test description"
tags: ["#marketing", "#data_ops"]
channel: data_ops
alert_suppression_interval: 24
slack_group_alerts_by: table
alert_fields: ["description", "owners", "tags", "subscribers", ...]
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.
Elementary supports configuring custom Slack channels for models and tests.
By default, Elementary uses the Slack channel that was configured in the Slack integration. Even if
a custom channel is defined for every test, you must specify a default fallback channel, either using
the CLI or the config.yml file.
models:
- name: my_model_name
config:
meta:
channel: data_opsdata_tests:
- not_null:
config:
meta:
channel: data_ops{{ config(
meta={
"channel": "data_ops"
}
) }}models:
path:
subfolder:
+meta:
channel: data_ops
data_tests:
path:
subfolder:
+meta:
channel: data_opsDon’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.
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.
models:
- name: my_model_name
config:
meta:
alert_suppression_interval: 24data_tests:
- not_null:
config:
meta:
alert_suppression_interval: 12{{ config(
meta={
"alert_suppression_interval": 24
}
) }}models:
path:
subfolder:
+meta:
alert_suppression_interval: 24
data_tests:
path:
subfolder:
+meta:
alert_suppression_interval: 48By 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.
models:
- name: my_model_name
config:
meta:
slack_group_alerts_by: tabledata_tests:
- not_null:
config:
meta:
slack_group_alerts_by: table{{ config(
meta={
"slack_group_alerts_by": "table"
}
) }}models:
path:
subfolder:
+meta:
slack_group_alerts_by: table
data_tests:
path:
subfolder:
+meta:
slack_group_alerts_by: tableCurrently this feature is supported only by test alerts!
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 test
- column: Displays the column name of the test
- description: Displays the description of the test
- owners: Displays the owners of the model on which the test is running
- tags: Displays the dbt tags of the test/model
- subscribers: Displays the subscribers of the test/model
- result_message: Displays the returned message from the test result
- test_parameters: Displays the parameters that were provided to the test
- test_query: Displays the query of the test
- test_results_sample: Displays a sample of the test results
models:
- name: my_model_name
config:
meta:
alert_fields: ["description", "owners", "tags", "subscribers"]data_tests:
- not_null:
config:
meta:
alert_fields: ["description", "owners", "tags", "subscribers"]{{ config(
meta={
"alert_fields": "['description', 'owners', 'tags', 'subscribers']"
}
) }}models:
path:
subfolder:
+meta:
alert_fields: ["description", "owners", "tags", "subscribers"]
data_tests:
path:
subfolder:
+meta:
alert_fields: ["description", "owners", "tags", "subscribers"]