Data-Engineer-Associate - Data Ingestion and Loading (21% of the exam) - Section 2.3

Use Auto Loader with schema enforcement and schema evolution, in directory listing or file notification mode, to land data into Unity Catalog governed tables.

Configure Auto Loader with the cloudFiles source to ingest new files incrementally, choosing between directory listing and file notification modes. Apply schema inference, schema hints, schema evolution modes and the rescued data column, and predict what happens when an unexpected column arrives.

Auto LoadercloudFilesfile notification modeschema evolutionrescued data column

Practice question for this objective

Free sampleData Ingestion and Loadingmedium

A data engineer ingests JSON files that land continuously in a single cloud storage directory. That directory already holds several million historical files, and the ingestion latency has grown steadily as the file count has risen, with most of each run spent before any data is read. The engineer must keep ingestion incremental and reduce the discovery cost as the directory keeps growing. Which approach addresses the cause?

  • AConfigure Auto Loader in directory listing mode so that each micro-batch enumerates the input directory and picks up files added since the previous run.
  • BSchedule a COPY INTO statement every ten minutes so that the target table is refreshed from the same directory without a streaming query holding compute.
  • CConfigure Auto Loader in file notification mode so that arriving files are discovered from cloud storage notification events instead of by enumerating the directory. Correct
  • DRead the directory with spark.read.json on a scheduled Lakeflow Job and overwrite the target table so that the most recent files are represented in it.
Auto Loader file notification mode scales file discovery with arrival rate rather than with the number of files already in the source directory. Auto Loader discovers new input files either by listing the source directory or by consuming cloud storage notification events. Listing cost grows with the total file count in the path, so a directory holding millions of files spends most of each run on discovery. Notification mode receives one event per arriving file, so discovery work is proportional to new arrivals and stays flat as history accumulates.

Why A is wrong: Directory listing mode is a valid Auto Loader file discovery mode and is the default, which makes it tempting, but it is the mode already causing the problem because its cost scales with the number of files in the directory.

Why B is wrong: COPY INTO is a genuine incremental ingestion command and skips files it has already loaded, but it still discovers candidate files by listing the source directory, so the listing cost that dominates the run is unchanged.

Why C is correct: File notification mode subscribes to storage events for the input path, so discovery cost depends on how many files arrive rather than on how many files the directory already contains.

Why D is wrong: This runs on the current orchestration product and looks simple, but a full read and overwrite reprocesses every historical file on each run, which abandons incremental loading and makes the listing problem worse.

See more Data-Engineer-Associate practice questions, answers explained.

Exam traps in Data Ingestion and Loading

Answers that look right on this material and are not. Each one is a distractor from a different question in the Data-Engineer-Associate bank for this domain.

  • The stream halts with an unknown field error and waits for an operator to restart it against the widened schema before any further rows land.

    Why it is wrong: This is the behaviour of the addNewColumns mode, which is the default, so a candidate who has read about that mode may transfer it here. The rescue mode is chosen precisely to keep the stream running, so no failure is raised.

  • It spreads the reading of each discovered file across more executors than directory listing mode can use, so a batch of the same size completes sooner.

    Why it is wrong: It is tempting because latency is being treated as a throughput problem. The two modes differ in how files are discovered, not in how the discovered files are read, and read parallelism is governed by the cluster and the file sizes.

  • The stream carries on without interruption and the new column appears in the target table from the first micro batch that contained it onwards.

    Why it is wrong: This describes what people expect evolution to mean, and it is close to how a pipeline behaves after the restart. The default mode stops the stream once rather than evolving in place.

Examworthy is not affiliated with or endorsed by Databricks. Original, blueprint-aligned practice material only.