QuestionQ66

VerifiedData Transformation, Cleansing, and Quality

A company uses Auto Loader in a classic Databricks job to process semi-structured JSON files from an external source. At times, records arrive with null critical fields, invalid types, or unanticipated nested-schema variations. The engineer must ensure malformed or nonconforming records are not silently dropped and instead are captured in a separate quarantine table. The pipeline must continue loading valid records into the Bronze layer without failing the job, and the approach must support both batch and streaming ingestion.

The data engineer must create a resilient ingestion pattern that automatically sends bad records to a quarantine Delta table while continuing to ingest good records into the Bronze layer for additional processing.

Which approach meets the quarantine mechanism requirement in this ingestion architecture?

Explanation

Lakeflow Spark Declarative Pipelines can use Auto Loader with expectations to validate records and implement a quarantine pattern: a clean flow retains only valid rows for the Bronze table, while a separate flow writes invalid rows to a quarantine Delta table. This preserves malformed or nonconforming data for investigation without stopping processing of valid records. Auto Loader supports both streaming and batch semantics in pipeline SQL through read_files.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!