← Databricks Data Engineer Associate: pipelines and operations
02 / 7 · 40 MIN

Incremental ingestion, state, and schema

Choose ingestion methods and handle source changes without losing traceability.

Concept and mechanism

Start with volume, frequency, format, and change behavior. Lakeflow Connect offers managed connectors with source-dependent incremental mechanisms; confirm support and release status. Standard connectors allow more customization.

COPY INTO loads files into Delta and normally avoids loading previously processed files again. Auto Loader uses cloudFiles and checkpoint state for incremental discovery and processing; it does not guarantee file arrival order. These guarantees do not eliminate repeated business events inside different files.

Retain identifiers, provenance, and reconciliation. For a custom API connector, define pagination, authentication, cursor handling, and failure behavior; completing the first page does not establish full ingestion.

Guided application

In an exercise, a source adds a column to a JSON export. With addNewColumns configured and an inferred schema, Auto Loader updates stored schema and stops the stream, which needs restarting. With rescue, it retains unexpected data in the rescued column without automatically changing schema.

The team must interpret the actual configuration, review the contract, and monitor that column. Deleting the checkpoint as a first reaction can cause unwanted reprocessing. Auto Loader inference uses strings by default for JSON and CSV; conversion to amounts and dates belongs in a controlled transformation.

Define quarantine and promotion criteria so technical compatibility does not hide changed meaning.

Auto Loader: schema evolution and recovery without reingestion

When Auto Loader uses addNewColumns and discovers a new column, it can write the updated schema in schemaLocation before stopping with UnknownFieldException; a subsequent run can resume using the updated schema with the original checkpoint.

This does not automatically change the datatype of an already known column. Rescue mode behaves differently: it does not evolve the schema, places unexpected values in _rescued_data and can continue on unknown fields. Do not confuse tracking processed files with event_id business deduplication: the source checkpoint cannot ensure that duplicated payments across different files produce a single business record.

For a controlled exercise, create file A with event_id 101 and file B with a repeated 101 plus a new column; demonstrate file counts, schema versions, rescued content, checkpoint preservation, accepted records and an explicit reconciliation rule.

Check configuration, privacy and retention requirements before deciding where production rejects are stored.

IN PRACTICE

A new file does not necessarily contain a new event.

Common pitfalls

Deleting state to fix schema; ignoring rescued data; assuming ordering; cursor without reconciliation.

Related topics: Platform, compute, and data contracts · Transformation, grain, and quality · Jobs, dependencies, and recovery

Take this idea with you

Preserve state and provenance, and validate ingested data meaning.

Create account

References

Databricks is a trademark of Databricks, Inc. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by Databricks. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.