
Answer-first summary for fast verification
Answer: 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.
The most robust and flexible solution involves creating a BigQuery scheduled query that runs the SQL transformation every two hours and enables notifications to a Pub/Sub topic. By using Pub/Sub and Cloud Functions, you can track consecutive failures, implement retry logic, and send an email notification only after three consecutive failures. This approach is superior because: - BigQuery scheduled queries can execute the SQL transformation at the desired frequency. - Pub/Sub captures failure notifications from the scheduled query. - Cloud Functions can monitor for consecutive failures, manage retries, and trigger email notifications after three failures. Other options either use inappropriate operators for aggregate transformations or lack the capability to specifically notify after three consecutive failures.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You need to set up a SQL pipeline that performs an aggregate SQL transformation on a BigQuery table every two hours, appending the result to another existing BigQuery table. The pipeline should retry in case of errors and send an email notification after three consecutive failures. How would you configure this pipeline?
A
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.
B
Use the BigQueryUpsertTableOperator in Cloud Composer, set the retry parameter to three, and set the email_on_failure parameter to true.
C
Use the BigQueryInsertJobOperator in Cloud Composer, set the retry parameter to three, and set the email_on_failure parameter to true.
D
Create a BigQuery scheduled query to run the SQL transformation with schedule options that repeats every two hours, and enable email notifications.