PDE Ingesting and Processing the Data Practice Question
A company is building a data pipeline that ingests streaming data from Pub/Sub, transforms it with Dataflow, and loads it into BigQuery. They want to handle malformed messages that cannot be parsed. Which TWO actions should they implement for error handling? (Choose 2)
⚠ Common exam trap
Google Cloud often tests the misconception that raising an exception (Option D) is acceptable for error handling in streaming pipelines, but the correct approach is to isolate failures using a dead letter sink (Option C) while logging errors (Option E) to maintain pipeline continuity.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a dead letter sink to write malformed messages to Cloud Storage or Pub/Sub for later analysis
A dead letter sink (e.g., writing malformed messages to Cloud Storage or a separate Pub/Sub topic) allows the pipeline to continue processing valid data while preserving the problematic records for offline inspection, retries, or debugging. This pattern is a standard best practice in streaming pipelines to avoid data loss and enable recovery without blocking the main data flow.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure the pipeline to drop malformed messages silently
Why it's wrong here
Dropping silently makes debugging difficult.
- ✗
Use a side input to filter out malformed messages
Why it's wrong here
Side inputs are for enriching data, not for error handling.
- ✓
Use a dead letter sink to write malformed messages to Cloud Storage or Pub/Sub for later analysis
Why this is correct
This allows reprocessing without blocking the main pipeline.
- ✗
Raise an exception in the DoFn to fail the pipeline immediately
Why it's wrong here
Failing the pipeline stops all processing, which is not desired.
- ✓
Log the error and continue processing the next message
Why this is correct
Logging allows monitoring and debugging while maintaining pipeline continuity.
Go deeper
Related to this question
About these practice questions
One of 890 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.