Courseiva
Ingesting and Processing the DatamediumMultiple ChoiceObjective-mapped

PDE Ingesting and Processing the Data Practice Question

You are designing a Dataflow pipeline to process streaming data. The pipeline may encounter malformed records. You need to handle these errors without failing the entire pipeline and store the bad records for later analysis. What is the best practice?

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 records to a separate Pub/Sub topic or GCS location.

Dead letter sinks are a common pattern: route erroneous records to a separate output (e.g., Pub/Sub topic or GCS) for later investigation. Writing to BigQuery using Storage Write API with error handling is good, but for malformed records you want to isolate them. Raising exceptions would fail the pipeline. Logging only loses the data.

Answer analysis

Option-by-option breakdown

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

  • Use a dead letter sink to write malformed records to a separate Pub/Sub topic or GCS location.

    Why this is correct

    This is the recommended pattern: isolate bad records for later reprocessing while allowing the pipeline to continue.

  • Catch the exception and log it, then continue processing.

    Why it's wrong here

    Logging loses the malformed record; you need to store it for analysis.

  • Write all records to BigQuery using the Storage Write API and handle errors in the write operation.

    Why it's wrong here

    This doesn't handle malformed records before BigQuery; they may cause failures.

  • Raise an exception in the DoFn to stop the pipeline for manual intervention.

    Why it's wrong here

    Stopping the pipeline is not desirable; it should be resilient.

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 →

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.