How to Configure BigQuery SQL Pipeline Retries and Notifications?
You need to create a SQL pipeline. The pipeline runs an aggregate SQL transformation on a BigQuery table every two hours and appends the result to another existing BigQuery table. You need to configure the pipeline to retry if errors occur. You want the pipeline to send an email notification after three consecutive failures. What should you do?
Community Votes
56% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests the distinction between native service features and managed orchestration workflows, with the common trap being over-engineering a custom Pub/Sub/Cloud Functions solution when Composer natively handles scheduling, retries, and alerts.
This question evaluates orchestrating scheduled BigQuery SQL transformations with automatic retries and failure alerts using Cloud Composer. Community consensus confirms that leveraging Apache Airflow operators is the most reliable and exam-approved approach compared to relying solely on native BigQuery scheduled queries.
Option D is frequently selected because it explicitly mentions the two-hour schedule and three-failure threshold, but it incorrectly assumes BigQuery scheduled queries can natively track consecutive failures across runs without extensive custom logic.
Community Discussion (12 comments)
- It provides a direct and controlled way to manage the SQL pipeline using Cloud Composer (Apache Airflow). - The BigQueryInsertJobOperator is well-suited for running SQL jobs in BigQuery, including aggregate transformations and handling of results. - The retry and email_on_failure parameters align with the requirements for error handling and notifications. - Cloud Composer requires more setup than using BigQuery's scheduled queries directly, but it offers robust workflow management, retry logic, and notification capabilities, making it suitable for more complex and controlled data pipeline requirements.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Cloud Composer (managed Apache Airflow) natively supports DAG scheduling, task retries, and failure notifications. The BigQueryInsertJobOperator efficiently executes arbitrary SQL, including INSERT...SELECT statements for appending aggregated results. Configuring retries=3 ensures automatic restarts on transient errors, while email_on_failure=True triggers an alert only after all retry attempts are exhausted, perfectly matching the requirement. The two-hour execution interval is standardly configured at the DAG level, which is assumed in professional certification contexts.Why the Other Options Are Wrong
Option A utilizes BigQueryUpsertTableOperator, which is designed for MERGE or UPSERT operations rather than simple data appends. Option C relies on BigQuery Scheduled Queries, which lack built-in retry mechanisms and cannot inherently track consecutive failures across independent execution cycles. Option D introduces unnecessary architectural complexity by routing alerts through Pub/Sub and Cloud Functions; Google exams consistently prefer fully managed orchestration tools like Composer for workflow management, reliability, and native alerting.Community Comment Notes
Candidates frequently debate between B and D due to the explicit phrasing in the question, but experienced engineers emphasize that Composer inherently manages both the schedule and failure tracking through DAG configuration. Comment [10] correctly points out that BigQuery scheduled queries do not natively retry failed executions, making Airflow the necessary choice for robust error handling. Comment [9] provides direct documentation links confirming the operator parameters and Composer notification settings, validating the technical accuracy of the recommended approach.Official Reference
- https://airflow.apache.org/docs/apache-airflow-providers-google/stable/_api/airflow/providers/google/cloud/operators/bigquery/index.html#airflow.providers.google.cloud.operators.bigquery.BigQueryInsertJobOperator
- https://cloud.google.com/composer/docs/composer-2/write-dags#notifications_on_operator_failure
- https://cloud.google.com/bigquery/docs/scheduling-queries
Exam Strategy
When a scenario emphasizes recurring schedules, automatic retries, and cross-run failure tracking, prioritize managed orchestration platforms like Cloud Composer over native service features. Certification exams routinely expect you to assume standard configuration practices, such as defining DAG schedules, rather than demanding they be explicitly repeated in the correct option.