How to Configure BigQuery SQL Pipeline Retries and Notifications?
Short answer
B Use the BigQueryInsertJobOperator in Cloud Composer, set the retry parameter to three, and set the email_on_failure parameter to true.
Question
Key Takeaways
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.
Common mistake: 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.
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
These links open the official vendor documentation in a new tab.
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.
Community Votes
56% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 12 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 12
-
raaad 👍 6 Answered B- 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.
-
datapassionate 👍 2 Answered DD. Create a BigQuery scheduled query to run the SQL transformation with schedule options that repeats every two hours, and enable notification to Pub/Sub topic. Use Pub/Sub and Cloud Functions to send an email after three failed executions This method utilizes BigQuery's native scheduling capabilities for running the SQL job and leverages Pub/Sub and Cloud Functions for customized notification handling, including the specific requirement of sending an email after three consecutive failures.
-
MarcoPellegrino 👍 2 Answered DA) Wrong, Upsert is not for appending B) Wrong, doesn't mention the 2 hours scheduling C) Wrong, doesn't mention the emailing D) Correct
-
Pime13 👍 1 Answered BB. Use the BigQueryInsertJobOperator in Cloud Composer, set the retry parameter to three, and set the email_on_failure parameter to true. This approach leverages Cloud Composer (Apache Airflow) to manage the SQL pipeline, providing robust workflow management, retry logic, and notification capabilities. By setting the retry parameter to three and enabling email notifications, you ensure that the pipeline will retry on errors and notify you after three consecutive failures.
-
josech 👍 1 Answered Bhttps://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
Show 7 more comments
-
b3e59c2 👍 1 Answered DTerrible options as usual. Whilst B is the most elegant, it doesn't explicitly address the 2 hour scheduling (you can schedule within Composer, but the answer doesn't mention it). If we take these answers on the surface level, D is the only option that actually achieves our goal.
-
joao_01 👍 1It s B (however for me its a incomplete answers cause it does not address the schedule of every 2 hours). Its not C or D because BigQuery scheduled queries by default does not retries the queries when error occurs. Link: https://cloud.google.com/bigquery/docs/scheduling-queries
-
plum21 👍 1 Answered D"You want the pipeline to send an email notification after three consecutive failures" - it is not about retries which are configurable via Composer operator - it is about 3 consecutive executions which could be for different hours.
-
scaenruy 👍 1 Answered BB. Use the BigQueryInsertJobOperator in Cloud Composer, set the retry parameter to three, and set the email_on_failure parameter to true.
-
e593506 👍 1 Answered DThe prompt wants an email notification sent after three failed attempts Option B does not meet that condition
-
Augustax 👍 1 Answered DThe retry times in B and clearly mentioned 2 hours in D make me think D is the better option..
-
JyoGCP 👍 1 Answered BOption B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.