I have a Airflow 1.10 DAG with the following sequence of operators -
PythonOperator1 --> S3KeySensor --> PythonOperator2 --> PythonOperator3
My requirement is to send email notification if -
- S3KeySensor fails (timeout occurs waiting for file with
soft_fail=Truei.e. skipped) - PythonOperator2 or PythonOperator3 fails
- No need to send email if DAG completes successfully
Can anyone please help how to implement this conditional logic with the EmailOperator.
Thanks.