1. 학습
  2. /
  3. 강의
  4. /
  5. Python으로 배우는 Apache Airflow 입문

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.