Google Cloud Professional Data Engineer · 25% practice allocation

Google Cloud Professional Data Engineer: Ingesting and processing data Practice Questions

5 free sample questions from the Ingesting and processing data domain, with answers and explanations. The full Professional Data Engineer bank has 252 questions across 5 domains. Questions are scenario-based and written from the official Google Cloud exam guide.

1.

SELECT THREE: Your organization is implementing a real-time data pipeline using Pub/Sub, Dataflow, and BigQuery. You need to select THREE of the following considerations to ensure the pipeline is production-ready and cost-effective. Which THREE?

  • A. Set up BigQuery slot reservations to guarantee query performance and enable the Storage Write API for efficient batch writes with deduplication.✓ Correct
  • B. Use the BigQuery Storage Write API with a 10-second commit interval to balance latency and write efficiency.
  • C. Implement comprehensive dead-letter topic handling in Pub/Sub for messages that fail processing in Dataflow, enabling replay and monitoring.✓ Correct
  • D. Configure Dataflow autoscaling with a maximum worker limit to prevent runaway costs during traffic spikes.
  • E. Enable Dataflow's Streaming Engine to leverage managed state and ensure consistent exactly-once semantics across restarts.✓ Correct
  • F. Configure Dataflow to use preemptible worker VMs to reduce compute costs, but accept occasional task interruptions requiring retry logic.
Explanation

The correct answers are options 1, 3, and 5. Option 1 is correct because the Streaming Engine is essential for maintaining state consistency and exactly-once semantics. Option 3 is correct because slot reservations guarantee query performance for analytics workloads, and the Storage Write API is the recommended approach for efficient, deduplicated writes to BigQuery. Option 5 is correct because dead-letter topic handling enables reliable error recovery and observability—critical for production pipelines. Option 2 is incorrect because using preemptible VMs in a critical real-time pipeline introduces unnecessary disruption risk; standard VMs are more appropriate. Option 4 is incorrect because a 10-second commit interval is arbitrary; the optimal interval depends on latency requirements and write volume, and the Storage Write API automatically handles efficient batching. Option 6 is partially correct (autoscaling is good), but it's less critical than the other three considerations for production readiness.

2.

A financial services company streams payment transactions through Pub/Sub into BigQuery using Dataflow with the BigQuery Storage Write API. During a traffic surge, the pipeline experiences latency spikes and some messages fail to write. You observe that the job is not scaling automatically despite increased message volume. What is the most likely cause and the recommended remediation?

  • A. The BigQuery Storage Write API has reached its quota; increase the reservation capacity and enable autoscaling in Dataflow✓ Correct
  • B. Pub/Sub max lease duration is too short; increase maxExtendedDeadlineSeconds in the PubsubIO configuration
  • C. The Dataflow job is CPU-bound; increase the machine type (e.g., from n1-standard-4 to n1-standard-8) and enable throughput-based autoscaling
  • D. The BigQuery table has too many columns; partition the table and optimize the write batch size
Explanation

Option 0 is correct. The BigQuery Storage Write API has quota limits, and traffic surges can exceed available write slots. Increasing BigQuery reservation capacity and enabling Dataflow autoscaling (which scales workers to handle increased data volume) directly address the bottleneck. Option 1 is incorrect—maxExtendedDeadlineSeconds relates to message acknowledgment deadlines, not write failures. Option 2 misdiagnoses the issue; write latency to BigQuery is rarely CPU-bound, and changing machine type without addressing the actual bottleneck (BigQuery Write API quota) won't help. Option 3 is incorrect—partitioning and batch size optimization are valid tuning techniques, but they don't address quota limits or autoscaling failures.

3.

Your Dataflow streaming pipeline reads from Pub/Sub, applies a series of transformations, and writes to BigQuery using streaming inserts. During a period of high load, you notice increased latency (messages are delayed by up to 30 seconds from ingestion to BigQuery), and the Dataflow job's worker CPU utilization is at 95%. You've verified that BigQuery is not the bottleneck. What is the most effective immediate mitigation?

  • A. Enable Dataflow autoscaling to increase the number of worker VMs, distributing the transformation workload and reducing latency.✓ Correct
  • B. Increase the Dataflow worker machine type from n1-standard-4 to n1-standard-16, allowing more CPU-intensive transformations per worker.
  • C. Switch from streaming inserts to the BigQuery Storage Write API with a 30-second batch window to reduce write overhead.
  • D. Reduce the transformation complexity by moving some validations to a pre-processing step on Cloud Functions.
Explanation

The correct answer is option 3. Since worker CPU is at 95% utilization (a bottleneck) and BigQuery is not the bottleneck, the issue is transformation throughput. Autoscaling adds more worker VMs to parallelize the transformation work, reducing latency and CPU pressure on individual workers. This is the most direct solution. Option 1 is incorrect because switching to the Storage Write API would actually increase latency (batching for 30 seconds) and doesn't address the CPU bottleneck in transformations. Option 2 is incorrect because upgrading a single worker's machine type doesn't parallelize work if the job is already configured to use all available CPU; autoscaling (adding more workers) is more effective. Option 4 is incorrect because moving transformations to Cloud Functions adds complexity and doesn't integrate well with Dataflow's stateful processing; it's a band-aid solution.

4.

A data engineering team is building a Dataflow batch job to process 8 TB of historical transaction logs from Cloud Storage. The job reads files sequentially, performs complex transformations, and writes results to BigQuery. During testing, the job runs for 6 hours on a single worker but the business needs results within 2 hours. Which autoscaling strategy should you implement?

  • A. Manually set the number of workers to 100 and disable autoscaling to ensure consistent performance
  • B. Enable Dataflow autoscaling with throughput-based scaling and set the target utilization to 70%✓ Correct
  • C. Use the Shuffle service with autoscaling and configure the job as a batch job with maxWorkers set to 20
  • D. Configure the job to use the Dataflow Streaming Engine with batch jobs disabled
Explanation

Option 0 is correct. Throughput-based autoscaling automatically scales workers based on the rate of data processing, which is the appropriate metric for batch jobs. A target utilization of 70% balances cost and performance. Option 1 is incorrect because the Streaming Engine is designed for streaming workloads, not batch jobs, and the option explicitly disables batch jobs. Option 2 is wrong because manual fixed worker counts don't adapt to actual workload demands and can result in wasted resources or insufficient capacity. Option 3 is partially correct about Shuffle service and batch jobs, but sets maxWorkers to only 20, which may be insufficient for the 3x speedup needed (8TB in 2 hours vs. 6 hours).

5.

Your team has a Dataflow streaming job that must handle exactly-once semantics for financial transaction processing. You're using Pub/Sub as the source and BigQuery as the sink. Which configuration ensures exactly-once delivery end-to-end?

  • A. Configure the Dataflow job with exactly-once processing mode and enable Pub/Sub acknowledgment checkpointing
  • B. Rely on BigQuery's native exactly-once guarantees without additional configuration in Dataflow
  • C. Enable Pub/Sub exactly-once delivery using a dead-letter topic and configure BigQuery to use insert_ids for deduplication
  • D. Use Dataflow's deduplication transform combined with BigQuery's MERGE statement for idempotent writes✓ Correct
Explanation

Option 1 is correct. Pub/Sub provides at-least-once semantics by design (no exactly-once guarantee). Dataflow's deduplication (storing message IDs in state) combined with BigQuery's MERGE statement (idempotent upsert) ensures end-to-end exactly-once semantics. This is the standard pattern for exactly-once financial transactions. Option 0 is wrong because Pub/Sub does not offer exactly-once delivery; dead-letter topics are for handling failed messages, not deduplication. Option 2 is incorrect—Dataflow does not have an 'exactly-once processing mode' in this context; it only guarantees exactly-once state updates. Option 3 is wrong because BigQuery does not provide end-to-end exactly-once guarantees across a pipeline; that responsibility falls to the pipeline orchestration.

Test yourself across every Professional Data Engineer domain

The free Professional Data Engineer practice test mixes about 20 questions weighted like the exam. The full 252-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Ingesting and processing data study guide (Professional Data Engineer) →

Other Professional Data Engineer domains

← All Google Cloud Professional Data Engineer study resources