Serverless Data Pipeline with Dataflow and Cloud Translation API
Short answer
B Use a Dataflow template pipeline to translate the reviews using the Cloud Translation API and set BigQuery as the sink.
Question
Key Takeaways
This ADP question evaluates the selection of a serverless data processing architecture. The correct answer leverages Dataflow templates combined with the Cloud Translation API to efficiently handle multi-language CSV ingestion and translation into BigQuery with minimal maintenance.
Expert Analysis
BigQuery scheduled queries automate running SQL transformations on a recurring schedule, ideal for daily review aggregations. Pub/Sub notifications (A) trigger pipelines but don't transform data. Cloud Scheduler + Dataflow (C) adds unnecessary complexity. Cloud Run (D) is for containers, not SQL schedules.
The scenario presents a classic data engineering challenge: processing unstructured text data in multiple languages and translating it to a target language while maintaining a serverless architecture with minimal operational overhead. The input data arrives as CSV files in Cloud Storage daily. The key constraints are "serverless," "efficient," and "minimal maintenance." Let's evaluate the options based on these constraints and the specific capabilities of Google Cloud services.
Option B suggests using a Dataflow template pipeline to translate reviews using the Cloud Translation API and setting BigQuery as the sink. While Dataflow is indeed a serverless batch processing service that can integrate with Cloud Translation API, this option has a critical flaw in its description relative to the source explanation provided. The source explanation explicitly states that "Cloud Scheduler + Dataflow (C) adds unnecessary complexity" and implies that the correct answer involves "BigQuery scheduled queries." However, looking at the options provided in the question text:
- Option A uses Dataproc (managed Hadoop/Spark), which requires cluster management configuration, violating the "minimal maintenance" constraint compared to fully managed serverless alternatives like Dataflow or BigQuery native features.
- Option C suggests using a Cloud Run function to load data into BigQuery and then training a BigQuery ML model for translation. Training an ML model for every new batch of reviews daily is computationally expensive, slow, and highly inefficient. It is not suitable for real-time or near-real-time translation needs and violates the "efficient" constraint. Furthermore, BigQuery ML is not primarily designed for high-volume text translation tasks where pre-trained APIs are more cost-effective.
- Option D suggests using a Cloud Run function to load data into BigQuery and creating a BigQuery remote function to invoke the Cloud Translation API, scheduled via a query. This approach is overly complex. Managing Cloud Run functions for ingestion adds latency and operational overhead. Using remote functions inside BigQuery for translation can be slower than native Dataflow processing due to network calls and orchestration overhead.
Wait, there is a discrepancy. The source answer key says B. But the reference explanation talks about "BigQuery scheduled queries" which sounds like it might be referring to a different option or there is a mismatch in the provided reference explanation text vs the options. Let's re-read carefully.
The reference explanation says: "BigQuery scheduled queries automate running SQL transformations... Pub/Sub notifications (A)... Cloud Scheduler + Dataflow (C)... Cloud Run (D)...". This explanation seems to map letters A, C, D to specific wrong approaches and implies B is correct, but the text for B in the explanation doesn't match the text for B in the options perfectly if we assume the explanation is describing the correct method. Actually, the explanation says "BigQuery scheduled queries..." is the ideal. None of the options A, C, D describe BigQuery scheduled queries directly as the primary mechanism. Option B describes Dataflow.
Let's look closer at Option B again. "Use a Dataflow templates pipeline to translate the reviews using the Cloud Translation API. Set BigQuery as the sink." Dataflow is the standard serverless stream/batch processing engine. It is efficient, scales automatically, and requires minimal maintenance. Integrating with Cloud Translation API is a standard pattern. This fits all constraints perfectly.
Why is Option B better than D? Option D involves Cloud Run for loading and Remote Functions for translation. Remote Functions in BigQuery are good for simple external calls, but for large-scale CSV ingestion and transformation, Dataflow is more robust and optimized for big data volumes. Cloud Run introduces cold starts and container management concerns (even if serverless). Dataflow handles the ETL process end-to-end.
Why is Option B better than A? Dataproc requires managing Spark clusters (even if autoscaling), which is more maintenance than Dataflow templates.
Why is Option B better than C? Training a custom ML model daily is absurdly inefficient for translation. Pre-trained APIs are the right tool.
Therefore, Option B is the most architecturally sound choice for a serverless, efficient, low-maintenance pipeline. The reference explanation's mention of "BigQuery scheduled queries" might be a distractor or a poorly phrased justification for why other scheduling methods are bad, or it might be incorrectly referencing the solution. However, since the Source Answer Key is validated as B, and B represents a valid, best-practice serverless ETL pattern using Dataflow and Cloud Translation, we accept B.
The core mechanism here is leveraging Dataflow as the orchestrator. Dataflow provides a unified programming model for both batch and streaming data. By using a template, you avoid writing custom code from scratch. The Cloud Translation API handles the NLP task. BigQuery serves as the structured storage for downstream analytics. This decouples ingestion, transformation, and storage, ensuring each component does what it does best.
Related Analysis
Practice All ADP Questions
Access 65 questions with complete answers and detailed explanations.
View Full ADP Practice Test →