Slack
Elementary Slack integration includes sending Slack alerts on failures in dbt tests and models, and the option to distribute the data observability report as a message attachment.
Token vs Webhook
There are two integration options: Token or Webhook. Both methods let you receive alerts from Elementary, but there are several features that are only supported in one of the two. Below is features support comparison table, to help you select the integration method.
If possible, Token is the preferred way. It allows more flexibility and supports more features than Webhook.
Slack integration | Elementary alerts | Elementary report | Multiple channels | Slack workflows |
---|---|---|---|---|
Token | ✅ | ✅ | ✅ | ❌ |
Webhook | ✅ | ❌ | ❌ | ✅ |
Slack integration setup
First create a Slack app:
Based on the method you selected, create a token or webhook:
Lastly, pass the token / webhook to the CLI as a param or in the config.yml
file:
Slack Workflows
If you use Slack Workflows, add the following configuration to your config.yml
under the slack tag:
slack:
notification_webhook: <your_slack_webhook_url>
workflows: true
This flag workflows: true
changes the format in which edr sends Slack alerts to the key-value pairs format supported by Slack Workflows.
The alert keys can be used to build a Slack workflow.
The alert format is:
{
"alert_description": str,
"table_name": str,
"detected_at": str,
"type": str,
"description": str
}