Courseiva

PDE Ingesting and Processing the Data Practice Question

You need to create a Dataflow pipeline that reads from Pub/Sub and writes to BigQuery. The pipeline must handle malformed messages by writing them to a dead-letter table in BigQuery. Which two Apache Beam transforms or patterns should you use to achieve this? (Choose two.)

⚠ Common exam trap

The trap here is thinking that a Filter transform alone can route failed messages to a different sink, but it only splits the PCollection and still requires additional transforms to write the failed messages.

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 ParDo transform with a side output for failed messages.

To handle malformed messages, you need to detect them and route them separately. A ParDo transform with a side output allows you to process each message and emit malformed ones to a secondary output. Then, you can write that side output to a BigQuery dead-letter table. The combination of a ParDo with side output and a separate BigQueryIO.Write for that output achieves the required dead-letter pattern.

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 ParDo transform with a side output for failed messages.

    Why this is correct

    A ParDo transform can process each message and, upon detecting a malformed record, output it to a side output (using MultiOutputReceiver or withOutputTags). The main output continues with valid records. This is a standard pattern for dead-letter handling in Apache Beam, allowing separate processing of errors.

  • ✓

    Write the failed messages to a separate BigQuery table using the side output from the ParDo.

    Why this is correct

    After using a ParDo with a side output for malformed messages, you can apply a BigQueryIO.Write transform to that side output, directing failed records to a dead-letter table. This separates error handling from the main pipeline and ensures malformed data is captured for later analysis or reprocessing.

  • ✗

    Write all messages to a BigQuery table and use a view to filter out malformed records.

    Why it's wrong here

    Writing all messages to BigQuery and then filtering with a view does not prevent malformed records from causing errors during write. If the schema does not match, the write may fail. It also does not provide a separate dead-letter table; it merely queries the same data, which may include invalid rows.

  • ✗

    Use a ParDo transform that throws an exception for malformed messages, and configure a dead-letter queue in Dataflow.

    Why it's wrong here

    Throwing exceptions in a ParDo will cause the pipeline to fail or retry indefinitely, depending on the runner. Dataflow does not have a built-in dead-letter queue configuration for exceptions; you must handle errors explicitly within the pipeline, such as with side outputs. This approach is not reliable for dead-lettering.

  • ✗

    Use a Filter transform to separate valid and invalid messages.

    Why it's wrong here

    A Filter transform can split messages based on a condition, but it only produces two outputs: one for messages that pass and one for those that fail. However, it does not provide a way to route failed messages to a different sink while continuing the main pipeline; you would need additional transforms to write the failed messages. It is less flexible than side outputs.

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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

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.