Before you startBefore you can start using the alerts, make sure to install the dbt package, configure a profile and install the CLI. This is required for the alerts to work.
First create a Microsoft Teams team:

Create a new Team

Go to the Microsoft Teams desktop app and create a new team.Microsoft Teams teamCreate a team from from a template and use the From Scratch template.Microsoft Teams templateChoose Public as the kind of a team.Microsoft Teams public teamCall it Elementary (or whatever you prefer) and connect it to the workspace of your choice.Microsoft Teams Elementary team
Now it is time to setup the webhook for this channel.

Create a webhook

Go to a channel in your Team and choose Manage channelTeams manage channelChoose Edit connectors.Teams edit connectorsSearch for Incoming webhook and choose Add.Teams add incoming webhookChoose Add again and add name your webhook ElementaryWebhook (or whatever you prefer). And Create the webhook.Teams create webhookCopy the URL of the webhook.Teams copy URL webhook
Lastly, pass the webhook to the CLI as a param or in the config.yml file:

Webhook:

Use the webhook URL when you execute edr monitor using the option -tw, --teams-webhook:
edr monitor --teams-webhook <your_teams_webhook_url>
The CLI reads the Teams integration from a file, copy it into a file called config.yml. Create it here: HOME_DIR/.edr/config.ymlHere is the format in the yml itself:

Webhook:

config.yml
teams:
  teams_webhook: <your_teams_webhook_url>

Execute the CLI

Make sure to run the following command after your dbt runs and tests:
edr monitor --teams-webhook <your_teams_webhook> --group-by [table | alert]
Or just edr monitor if you used config.yml.

Alert on source freshness failures

Not supported in dbt cloud 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.

Continuous alerting

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.