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

Connected

연습 문제

Implementing an SmtpNotifier

Now that you've successfully created a failure callback, your team lead has asked that all successful Dag runs be sent via email to a team alias. After reviewing the Airflow documentation, you decide that using Airflow's built-in notifier framework is your best option.

The dag and task objects are already imported, the alert_on_failure callback function and the get_sales_data and process_sales_data tasks are already defined for you.

지침

100 XP
  • Import the SMTP notifier object.
  • Add a success callback attribute to the Dag.
  • Send the notification to [email protected].
  • Include a subject.