English · IndiaLog in
Rackwave Technologies
Request quote Free consultation
DataUpdated 26 Nov 2026

Databricks Auto Loader: Incremental File Ingestion Explained

Databricks Auto Loader: file discovery, schema evolution, bad data and cost.

Written by Rohan Verma
  • Published25 Nov 2026
  • Read time7 min
  • Length1,321 words
Share this guide

What is Auto Loader in Databricks? Auto Loader is a Databricks feature that incrementally and efficiently ingests new files from cloud storage as they arrive. It tracks which files have been processed, scales to millions of files, infers and evolves schemas and writes to Delta tables with exactly-once guarantees when used with checkpoints. This guide explains how Auto Loader works, the difference between directory listing and file notification modes, how schema inference and the rescued data column behave, how to use it in streaming and batch style, how to handle bad data, cost and monitoring and when to choose another approach. Options change by release, so confirm details in current Databricks documentation.

Short answer: Auto Loader reads new files from cloud storage through the cloudFiles source, remembers what it has processed in a checkpoint and writes to Delta. Use it for file ingestion into bronze tables, with schema evolution and a rescued data column for unexpected fields.

What is Auto Loader?

Ingesting files sounds simple until volumes grow. Listing a bucket with millions of objects each run is slow, and keeping track of which files were handled is error prone. Auto Loader solves this with an incremental file source for Structured Streaming. You point it at a folder, tell it the file format and it processes only new files. It is the standard front door for bronze tables in Databricks and works inside Delta Live Tables pipelines and jobs.

Auto Loader diagram
Figure 1. Auto Loader: cloud storage, cloudfiles, checkpoint and how they relate.

How it discovers files

ModeHow it worksChoose when
Directory listingLists the input path incrementally to find new filesSimple setups and small to medium volumes, no extra cloud permissions
File notificationUses cloud storage events and a queue to learn about new filesVery large volumes or directories where listing would be slow

File notification mode needs additional cloud permissions and resources, so plan access with your cloud team before choosing it.

Basic pattern

df = (spark.readStream
  .format("cloudFiles")
  .option("cloudFiles.format", "json")
  .option("cloudFiles.schemaLocation", "/checkpoints/orders_schema")
  .load("/landing/orders/"))

(df.writeStream
  .option("checkpointLocation", "/checkpoints/orders")
  .trigger(availableNow=True)
  .toTable("bronze.orders"))

This is a simplified sketch. The trigger availableNow processes all new files and then stops, which gives batch-style cost with streaming bookkeeping.

Schema inference and evolution

  • Auto Loader can infer the schema from a sample of files and store it at the schema location.
  • When new columns appear, it can add them according to the evolution mode you choose, stop with an error or rescue them.
  • A rescued data column captures values that did not match the schema, such as an extra field or a type mismatch, so no data is lost.
  • For stricter control, provide an explicit schema or schema hints for important columns.
  • Review schema changes before they reach curated tables. See Delta Lake for schema enforcement.

How to set up file ingestion

  1. Agree the file contract. Define format, folder structure, naming and delivery frequency with the source team.
  2. Create storage access. Use governed external locations or volumes. See Unity Catalog.
  3. Choose the mode. Start with directory listing and move to notifications for scale.
  4. Define schema handling. Pick an evolution mode and keep a rescued data column.
  5. Write to a bronze table. Add the source file path and ingest time as columns.
  6. Pick the trigger. Use availableNow on a schedule for batch needs or continuous for low latency.
  7. Monitor. Track files processed, lag and rescued data volume.

Handling bad data

Bad files happen. Keep the raw record in the bronze table with its source file name, send unparseable rows to a quarantine location and report counts to the owning team. Do not silently drop data. For corrupt files, configure the behaviour you want, such as ignoring and recording the file, and build an alert. Downstream silver logic should filter and fix, while bronze keeps the faithful copy so you can replay after a fix.

Cost and performance

  • Directory listing is cheap for modest volumes, but listing very large folders adds time and cost.
  • File notifications reduce listing but require queue and event resources that have their own small cost.
  • Compact small files upstream where possible, because millions of tiny files slow everything.
  • Use availableNow on a schedule instead of a continuously running stream when freshness of minutes is enough.
  • Size compute to the batch of new files and use autoscaling with limits.

Auto Loader compared with other ingestion

OptionStrengthLimit
Auto LoaderIncremental files, schema evolution, scaleFiles in cloud storage only
COPY INTOSimple idempotent SQL loadsBetter for smaller, scheduled loads
Streaming from message systemsLow latency eventsNeeds a message platform. See Apache Kafka
Database replication toolsKeep tables in step with operational databasesHandled by CDC tooling. See change data capture

Many platforms use several options, one per source type.

Designing the landing area

DecisionRecommendationReason
Folder structureSource, entity and date foldersMakes replays and debugging easy
File formatPrefer columnar formats such as Parquet where possible, JSON or CSV only when requiredSmaller, faster and typed
File sizeAim for moderate sizes rather than many tiny filesReduces listing and processing overhead
RetentionKeep raw files for the replay window you needLets you rebuild bronze after a fix
PermissionsWriters can add files, the pipeline can only readProtects the raw record

Agree these points in writing with the team that produces the files. Most ingestion incidents trace back to changes in the file contract that nobody announced, so add a contact and a change process to the agreement, and test the pipeline whenever the contract changes.

Metadata worth capturing

  • The source file path and modification time, so any bronze row can be traced to its file.
  • The ingest timestamp and pipeline run id for audit and replay.
  • The schema version or a hash of the columns seen, to spot silent changes.
  • Counts of rows read, rows rescued and files skipped per run, written to a monitoring table.

Common mistakes

  • Sharing one checkpoint location between different streams.
  • Not setting a schema location, so schema inference repeats or breaks.
  • Letting unexpected columns flow into curated tables without review.
  • Running a continuous stream for a feed that arrives once a day.
  • Ignoring the rescued data column until it holds months of lost fields.

A worked example

A retailer receives order files from forty stores into cloud storage, with irregular timing. A job runs Auto Loader every ten minutes with availableNow into a bronze orders table that includes the file name and ingest time. When one store added a loyalty field, the rescued data column captured it and an alert prompted the team to add it deliberately to the silver model.

Total compute cost stayed small because the cluster ran only for a few minutes per run, and replaying a day after a bug fix was a single rerun from bronze. The example is illustrative.

Best practices and support

  • Keep the landing area read-only for the pipeline and retain files long enough for replay.
  • Version the file contract and agree how changes will be announced.
  • Record lineage from landing files to bronze tables in the catalog.
  • Test with a malformed file before go-live.

Our data analytics service builds ingestion on Databricks, and our system integration service connects source systems that deliver the files.

Key takeaways

  • Auto Loader ingests new files incrementally from cloud storage.
  • Choose directory listing first and notifications for scale.
  • Schema inference and a rescued data column protect against change.
  • Use availableNow on a schedule for batch-style cost.
  • Keep bronze faithful so you can replay.

Quick glossary

TermMeaning
Auto LoaderIncremental file ingestion feature
cloudFilesThe source format used by Auto Loader
CheckpointStored progress that prevents reprocessing
Rescued data columnColumn that holds unmatched values
availableNowTrigger that processes all new data and stops

Read next: BigQuery vs Snowflake: Which Cloud Data Platform? · BigQuery Streaming Inserts: Real-Time Ingestion Guide · BigQuery Access Control: IAM, Policy Tags and Row Security

Frequently asked questions

What is Auto Loader?

A Databricks feature that incrementally ingests new files from cloud storage and tracks processed files with checkpoints.

What are the file discovery modes?

Directory listing, which scans the path incrementally, and file notification, which uses cloud events and a queue.

Does Auto Loader infer schema?

Yes. It can infer and store a schema and evolve it when new columns appear, based on the mode you choose.

What is the rescued data column?

A column that captures values that did not fit the schema, so unexpected data is kept instead of lost.

Can I use it in batch style?

Yes, with a trigger such as availableNow that processes all new files and then stops.

How does it avoid duplicate loads?

It records processed files in the checkpoint, which provides exactly-once processing when used correctly.

When is COPY INTO better?

For smaller scheduled loads where simple idempotent SQL is enough.

How do I monitor it?

Track files processed, lag, rescued data volume and failures in the pipeline or job metrics.

Was this guide helpful?Your answer helps us decide what to improve. It is not linked to you.

#auto loader#databricks auto loader#auto loader cloudfiles#auto loader schema evolution#databricks file ingestion#rescued data column

About the author

Rohan Verma

Data Platforms Consultant

Rohan works across CDP, data warehouse, and analytics platform implementations, helping clients figure out which data infrastructure actually fits their scale rather than defaulting to whatever's currently trending.

Data Platforms & Technical Architecture

Ready to put AI and data to work?

Book a free consultation and leave with a plan, not a pitch.

Get a free consultationRequest quote