1. Learn
  2. /
  3. คอร์ส
  4. /
  5. Introduction to Apache Airflow in Python

Connected

แบบฝึกหัด

Implementing a Trigger Rule

After creating a workflow, you realize the Dag would benefit from providing some updates when at least one task fails. You decide to implement a task that implements the one failed check on your Dag to alert you if any task in the Dag fails.

All other tasks have been defined and the task & dag objects are already imported for you.

คำแนะนำ

100 XP
  • Import the appropriate library to use trigger rules.
  • Add the appropriate trigger rule attribute to the notify_on_failure task.
  • Set the attribute so the task triggers when one or more upstream tasks fail.
  • Set notify_on_failure as a downstream dependency of the two transform tasks.