Alerting
Last updated
Was this helpful?
Last updated
Was this helpful?
In certain situations, you want to trigger alerts, for example, when a pipeline has finished. To do this, you can leverage the datafold-sdk
. This small Python library allows you to trigger an alert in Datafold.
First, we need to set the credentials using the environment variable DATAFOLD_APIKEY
. In the case of self-hosted Datafold, you need to set the DATAFOLD_HOST
as well:
Find the alert that you want to trigger. You can find the ID of the alert by looking at the URL:
Now you can run the alert:
If the alert fails, you will get a message through the configured subscriptions (email, pagerduty, slack, etc). There is also the option to run the alert blocking:
This way, the CLI will wait for the alert to finish, and you can see the result in the console.