user1112259
user1112259

Reputation:

How to execute a custom function if there is an exception in airflow?

If there is an exception in Airflow I want to execute a custom function or Activity. Is it possible to do that in airflow? I also want to send the exception message to the method or activity.

Upvotes: 0

Views: 634

Answers (1)

ozs
ozs

Reputation: 3681

For every dag and task you can define "on_failure_callback" . once you get exception in task and it failed this function is called.

for more details see : https://airflow.apache.org/docs/apache-airflow/2.2.2/logging-monitoring/callbacks.html

Upvotes: 0

Related Questions