18 lines
395 B
Python
18 lines
395 B
Python
from airflow import DAG
|
|
from airflow.operators.python_operator import PythonOperator
|
|
from datetime import datetime
|
|
|
|
def fail_task():
|
|
raise ValueError("This task is designed to fail")
|
|
|
|
dag = DAG(
|
|
'test_failure_notification',
|
|
start_date=datetime(2025, 4, 22),
|
|
schedule_interval=None
|
|
)
|
|
|
|
task = PythonOperator(
|
|
task_id='failing_task',
|
|
python_callable=fail_task,
|
|
dag=dag
|
|
) |