SpinTheMic
Pro

Databricks · Beginner

What is Auto Loader in Databricks?

By Anurag Pandey, Lead Data Engineer ·

The short answer

Auto Loader is a Structured Streaming source, cloudFiles, that picks up new files from cloud storage incrementally. It remembers which files it processed in a checkpoint, so each file is loaded once, and it can infer and evolve the schema.

Practice this out loud

Opens this question on SpinTheMic. Start without signing up; sign in free for an AI report card.

Say it like this

About 55 seconds out loud. Use it as a model, then put it in your own words.

Auto Loader is how I ingest files that keep landing in cloud storage, like JSON or CSV drops in S3 or ADLS. It's a Structured Streaming source called cloudFiles. I point it at a folder, and it processes only files it hasn't seen before. It tracks those files in the stream's checkpoint, so if the job restarts, it continues where it stopped and each file is ingested exactly once. It can infer the schema and store it in a schema location, and when new columns appear it can evolve the schema. Data that doesn't fit the schema goes into a rescued data column instead of being lost. I don't need it running all the time either: with an availableNow trigger, it processes everything new and then stops, like a scheduled batch job.

What interviewers look for

  • You describe it as incremental, exactly-once file ingestion.
  • You mention the checkpoint and schema location.
  • You know it can run as a scheduled batch with availableNow.

Common mistakes

  • Saying it reprocesses the whole folder on every run.
  • Thinking Auto Loader must run as an always-on stream.
  • Ignoring schema changes, which is where real pipelines break.

Follow-up questions to expect

  1. 1How does Auto Loader discover new files?
  2. 2What is the rescued data column for?
  3. 3When would you use COPY INTO instead of Auto Loader?
Practice this out loud

Opens this question on SpinTheMic. Start without signing up; sign in free for an AI report card.

Checked against

All interview question guides