Elementary has a Slack integration to send alerts about:
Failures and/or of dbt tests
Failures and/or Elementary tests
Model runs failures
Source freshness issues
You can enrich your alerts by adding properties to tests and models in your .yml files.
The supported attributes are: owner, subscribers, description, tags.
Go to the “OAauth & Permissions” page for your newly-created app, and add the following scopes under “Bot Token Scopes”:
channels:join - Join public channels in a workspace
channels:read - View basic information about public channels in a workspace
chat:write - Send messages as <app>
files:write - Upload, edit, and delete files as <app>
users:read - View people in a workspace
users:read.email - View email addresses of people in a workspace
groups:read - View basic information about private channels that your slack app has been added to
2. Install app at your Workspace
At the “OAuth & Permissions” page, press on “Install to Workspace” in order to generate Slack token:
Create a webhook
Go to the ‘Incoming Webhooks’ page for your newly-created app and toggle ‘Activate Incoming Webhooks’ to turn it on. Then click on ‘Add New Webhook to Workspace’:
Select the channel that the notifications will be posted to:
Lastly, pass the token / webhook to the CLI as a param or in the config.yml file:
Token:
Use the Slack token when you execute edr monitor using the option -st, --slack-token and -ch, --slack-channel-name:
To alert on source freshness, you will need to run edr run-operation upload-source-freshness right after each execution of dbt source freshness.
This operation will upload the results to a table, and the execution of edr monitor will send the actual alert.
Note that dbt source freshness and upload-source-freshness needs to run from the same machine.
Note that upload-source-freshness requires passing --project-dir argument.
In order to monitor continuously, use your orchestrator to execute it regularly (we recommend running it right after
your dbt job ends to monitor the latest data updates).
Read more about how to deploy Elementary in production.
If you need help or wish to consult on this, reach out to us
on Slack.