
Answer-first summary for fast verification
Answer: Assign a function with notification logic to the on_failure_callback parameter for the operator responsible for the task at risk.
The correct answer is C. The on_failure_callback parameter is specifically designed to invoke a function when a task fails. By assigning a function with notification logic to this parameter, you can ensure that you receive immediate notifications whenever the task fails. This approach allows for customizable notification logic, such as sending emails or creating alerts, making it a direct and effective way to handle task failures.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a data engineer utilizing Cloud Composer to manage your ETL pipelines, you have set up an Apache Airflow directed acyclic graph (DAG) to automate this process. One of the critical tasks within this DAG depends on an external third-party service. To ensure reliability and prompt issue resolution, you need a notification system in place to alert you whenever this specific task fails to execute successfully. What actions should you take to implement this notification?
A
Assign a function with notification logic to the on_retry_callback parameter for the operator responsible for the task at risk.
B
Configure a Cloud Monitoring alert on the sla_missed metric associated with the task at risk to trigger a notification.
C
Assign a function with notification logic to the on_failure_callback parameter for the operator responsible for the task at risk.
D
Assign a function with notification logic to the sla_miss_callback parameter for the operator responsible for the task at risk.
No comments yet.