A nightly batch Dataflow job loads partner files into BigQuery. Some rows have malformed dates and fail to load. The rest must still load. What is the best design?
- Exam domain
- Ingesting and processing the data~25% of the exam
- Difficulty
- Medium
- In this mock
- 14 questions on this domainPractise this domain
Why the exam asks this
Ingesting and processing the data: Building the pipelines.
Objective in the exam guide: Data cleansing.
Real data is dirty. The exam checks a robust batch design.
Why D is the answer
Clean and validate rows in the pipeline and send rows that still fail to a dead-letter table for review
Cleansing fixes what it can; a dead-letter table keeps failed rows for later processing without blocking good data.
How it works
Cleansing standardizes and validates records in the pipeline.
Rows that still fail are sent to a dead-letter queue or table.
Good rows continue, and failed rows can be fixed later.
Clues in the question
The words that point to the answer, and what each one tells you.
- The rest must still load
- Isolate bad rows.
In detail
- Track the dead-letter row count as a quality metric.
- Fix the source format with the partner when possible.
Side by side with look-alikes
| Design | Keeps good data? | Keeps bad rows? |
|---|---|---|
| Clean plus dead-letter | Yes | Yes |
| Fail on first error | No | Yes |
| Drop silently | Yes | No |
| Switch to streaming | Unchanged | Unchanged |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Fail the whole job on the first bad rowWrongMost tempting
One bad row would block all good data.
Why it tempts: It is strict and safe. But it blocks all good data for one bad row.
B. Drop bad rows silentlyWrong
Silent drops lose data with no trace.
C. Switch the job to streamingWrong
Streaming does not fix bad data.
D. Clean and validate rows in the pipeline and send rows that still fail to a dead-letter table for reviewRight
Cleansing fixes what it can; a dead-letter table keeps failed rows for later processing without blocking good data.
In practice
- Alert when the dead-letter count exceeds a threshold.