
Explanation:
The correct approach is to assign a function with notification logic to the on_failure_callback parameter of the operator responsible for the task. This ensures you're notified immediately upon task failure.
sla_missed metrics alerts you to SLA breaches, not task failures.on_retry_callback triggers during task retries, not failures.sla_miss_callback is not a valid parameter in Apache Airflow for failure notifications.Ultimate access to all questions.
As a Google Professional Data Engineer orchestrating ETL pipelines with Cloud Composer, you encounter a scenario where a task in your Apache Airflow DAG depends on a third-party service. How can you set up notifications to alert you when this task fails?
A
Configure a Cloud Monitoring alert on the sla_missed metric linked to the task to initiate a notification.
B
Assign a function containing notification logic to the on_retry_callback parameter of the operator handling the task.
C
Assign a function with notification logic to the on_failure_callback parameter of the operator responsible for the task.
D
Assign a function with notification logic to the sla_miss_callback parameter for the operator handling the task.
No comments yet.