Public-health notebooks sometimes hit parse errors on clinic rows. What error-handling pattern should they use?
Select an answer to reveal the explanation.
Short Explanation
Bad clinic rows need a quarantine tray—catch the parse flub, set the bad record aside, and keep the good ones moving.
Full Explanation
Civic notebook and job pipelines should handle parse errors explicitly. Public-health clinic rows that fail parsing should be caught and written to a quarantine path so good rows continue and bad rows remain available for remediation—rather than stashing them in a _corrupt_record column inside bronze tables where bad data still sits alongside good, or skipping them on read with DROPMALFORMED mode so the malformed rows vanish without a review trail. Structured error handling preserves partial progress for clinic operations while isolating defective records for data stewards.
Storing malformed clinic rows in a _corrupt_record column and keeping them in bronze tables fails by concept: incomplete clinic facts remain in the main lakehouse without a true quarantine, so bad records stay queryable as if they were valid. Skipping malformed clinic rows on read with DROPMALFORMED mode and refreshing metrics maximizes silent data loss: bad rows disappear before they can be quarantined, and refreshed metrics cannot recover the missing evidence trail operators need. Logging parse failures with Delta expectations and overwriting daily bronze tables using clean clinic rows is not a scalable error-handling pattern: it still discards or overwrites the bad rows rather than isolating them in a quarantine path, and expectations alone do not give stewards a reviewable queue.
Exam caveat: quarantine implies a review process; without a steward workflow, quarantine tables become graveyards—pair the pattern with alerting and retention policy. Operational check: inject malformed clinic rows alongside valid ones, confirm valid rows land in the target table, confirm bad rows appear only in quarantine with error context, and verify the job does not report overall success without recording parse failures.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.