Google Cloud Professional Data Engineer — Question 145
You orchestrate ETL pipelines by using Cloud Composer. One of the tasks in the Apache Airflow directed acyclic graph (DAG) relies on a third-party service. You want to be notified when the task does not succeed. What should you do?
Answer options
- 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 tor 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.
Correct answer: C
Explanation
The correct answer is C because the on_failure_callback parameter is specifically designed to execute a function when a task fails, allowing for immediate notifications. Options A and D focus on retry and SLA miss callbacks, which do not address task failure directly. Option B involves monitoring metrics but does not provide immediate notification upon failure.