Courseiva

PDE Ingesting and Processing the Data Practice Question

A media company streams real-time viewer data from Pub/Sub to BigQuery using a Dataflow pipeline. They need to handle occasional malformed messages without losing valid data. Which pattern should they implement?

⚠ Common exam trap

Google Cloud often tests the dead letter pattern to see if candidates understand that streaming pipelines must handle bad data gracefully without stopping or losing valid records, and the trap is that many candidates choose retry logic (Option B) because they confuse transient errors with permanent data quality issues.

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

✓

Implement a dead letter sink to store malformed messages for later analysis

A dead letter sink (e.g., a separate Pub/Sub topic or a BigQuery error table) allows the Dataflow pipeline to route malformed messages out of the main processing path while continuing to process valid data. This pattern ensures no valid data is lost and provides a durable location for later analysis or reprocessing of the malformed records, which is essential for streaming pipelines where data quality issues are intermittent.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Raise an exception in the pipeline and stop processing

    Why it's wrong here

    Halting the pipeline on a malformed message aborts the entire streaming job, so every valid record buffered behind it is lost — the opposite of the requirement. It is tempting because fail-fast exception handling suits batch jobs where a single bad input should stop the run for inspection.

  • ✗

    Use retry logic in the pipeline to reprocess malformed messages indefinitely

    Why it's wrong here

    Indefinite retries on malformed messages block the pipeline and prevent valid records from progressing, since the same failing element is reprocessed forever. Retry logic is correct for transient failures such as temporary BigQuery unavailability, not for permanently unparseable payloads.

  • ✓

    Implement a dead letter sink to store malformed messages for later analysis

    Why this is correct

    A dead letter sink diverts messages that fail parsing or validation into a separate store, so the pipeline continues processing valid records without data loss. This satisfies the requirement to handle occasional malformed messages while preserving valid viewer data for later analysis.

  • ✗

    Discard malformed messages and log an error

    Why it's wrong here

    Dropping malformed messages silently loses those records rather than routing them aside for later inspection or reprocessing, so no dead-letter path exists. It is tempting because error logging is standard defensive practise, but logging alone does not preserve the failed data for recovery.

About these practice questions

Courseiva writes every PDE question from scratch — 747 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.