CertSafari
    Databricks Certified Data Engineer Associate· Lessons

    Domain 2 · Lesson 3/33

    Data ingestion patterns: batch, incremental and streaming in Databricks

    Enable and detail data ingestion patterns, including batch, streaming, and incremental loading, and import data from sources such as local files, Lakeflow Connect standard connectors, and Lakeflow Connect managed connectors

    17 min read
    3% of exam
    10 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Tell batch, incremental and streaming ingestion apart by whether the engine keeps a record of what it has already processed
    • Choose triggered or continuous execution for a pipeline by weighing cost against freshness, and explain what availableNow does
    • Explain how an Auto Loader stream keeps track of its inferred schema, and predict how each schema evolution mode reacts to new columns
    • Import local files with the file upload UI and know its limits
    • Name the ingestion semantic that Lakeflow Connect standard and managed connectors each give you

    Key concept

    Ingestion state — The record an ingestion engine keeps of what it has already processed, such as loaded file names, checkpointed file metadata or change-tracking cursors. Incremental and streaming patterns have this state and process only new data. Plain batch has none, so every run sees the whole source again.

    1.Batch, incremental and streaming: what the engine remembers

    Every ingestion pattern comes down to one question: does the engine remember what it has already processed? Ingestion copies data from a source system into Databricks tables, and sources keep changing. New files land, rows get updated, messages arrive. A pattern without memory has to read the whole source again on every run. A pattern with memory carries on from where it stopped. This is why Lakeflow Connect builds on incremental reads and writes rather than full reloads.

    Plain batch reads once. It takes whatever is in the source at that moment, writes it to a table, and keeps no record of what it took. Run it again over the same folder and it cannot tell old files from new ones, so you end up with duplicate rows or a full overwrite. That works for a one-off load and causes problems for anything on a schedule.

    Incremental loading gives a batch run a memory. COPY INTO idempotent incremental loads is the SQL version of this pattern. It is an ordinary command, not a stream, but it remembers which files it has loaded. You can therefore schedule the same statement over and over against the same directory, and each run loads only the new data. Idempotent means that running it twice over unchanged input does nothing the second time.

    Streaming stores its memory in a checkpoint and treats the source as a continuous flow. Auto Loader cloudFiles source and file discovery is the file-based example. As Auto Loader discovers files, it writes their metadata to a RocksDB key-value store in the stream's checkpoint location. If the stream fails, it resumes from that checkpoint and still writes each file to Delta Lake exactly once. You never manage that state yourself, and losing or sharing the checkpoint is what breaks the guarantee.

    Ingestion semantics compared by where the memory of processed data lives
    PatternRemembers what it processed?Where the state livesExample
    Plain batchNoNowhere: each run sees the whole sourceFile upload UI creating or overwriting a table
    Incremental batchYesThe record of already-loaded files kept for the target tableCOPY INTO run on a schedule
    StreamingYesRocksDB key-value store in the checkpoint locationAuto Loader (cloudFiles) in Structured Streaming

    Checkpoint 1 of 8· Match them up

    Match each ingestion tool to how it keeps track of the data it has already processed

    Tap a term, then the definition that fits it.

    Sources123

    2.Triggered versus continuous execution

    Memory decides what gets processed. Execution mode decides when. A triggered pipeline runs on a schedule or when someone starts it manually, processes the new data, and stops. A continuous pipeline keeps running and processes new data as it arrives in the source. Databricks pairs triggered mode with batch ingestion and continuous mode with streaming ingestion, and you can set any ingestion pipeline to either one.

    The trade-off is cost against freshness. A continuous pipeline keeps working between arrivals, so data reaches the table soon after it lands. A triggered pipeline costs only the time its runs take, but data can be as stale as the gap between runs. A nightly finance report loses nothing on a triggered pipeline. An operations dashboard that needs events within seconds can't wait for the next scheduled run. Databricks' advice is to pick the mode that balances latency and cost for the use case. If you don't, cloud storage costs can come in higher than expected.

    Structured Streaming offers the same choice through trigger modes. The one that matters most for ingestion is availableNow. A stream started with .trigger(availableNow=True) processes all the data available when the job starts and then stops. Databricks calls this scheduled incremental batch processing. Auto Loader runs on Structured Streaming, so you can use a streaming file source without paying for always-on compute: the checkpoint still tracks progress, and a schedule decides when the stream runs.

    Structured Streaming trigger modes and what each one does
    Trigger modePython syntaxBehaviour
    Unspecified (Default)N/ARuns continuously as long as new data arrives, with roughly 3-5 second latency
    Processing Time.trigger(processingTime='10 seconds')Checks for new data at a fixed interval, so the system doesn't poll too often
    Available Now.trigger(availableNow=True)Processes everything available when triggered, then stops (scheduled incremental batch)

    Checkpoint 2 of 8· Check yourself

    A Lakeflow pipeline ingests files from cloud storage for a finance report that is read once each morning. The team wants new files tracked so nothing loads twice, and they want compute costs low. How should they run the pipeline?

    Sources45

    3.Schema tracking in an incremental file stream

    An incremental file stream also has to remember a schema. If an Auto Loader stream reads files without an explicit schema, it infers one. It then has to keep that schema between runs so it can tell when the incoming data drifts. The option that enables this is cloudFiles.schemaLocation. Auto Loader keeps the inferred schema in a _schemas directory under that path and records every change to it. The checkpoint tracks which files were read, and the schema location tracks the shape of the data.

    An Auto Loader stream with separate locations for its schema and its checkpoint (Scala)scala
    spark.readStream.format("cloudFiles")
      .option("cloudFiles.format", "parquet")
      // The schema location directory keeps track of your data schema over time
      .option("cloudFiles.schemaLocation", "<path-to-schema>")
      .load("<path-to-source-data>")
      .writeStream
      .option("checkpointLocation", "<path-to-checkpoint>")
      .start("<path-to-target>")

    Inference works from a limited sample. On the first read, Auto Loader samples the first 50 GB or the first 1,000 files it finds, whichever limit it reaches first. To change the sample size, set the SQL configurations spark.databricks.cloudFiles.schemaInference.sampleSize.numBytes and spark.databricks.cloudFiles.schemaInference.sampleSize.numFiles. Some formats don't store data types: JSON, CSV and XML. For these, Auto Loader infers every column as a string by default, including nested JSON fields. Parquet and Avro carry their types in the files. Note that column types and schema tracking are separate concerns. The example above reads Parquet and still sets a schema location.

    In the default mode, addNewColumns, a new column stops the stream with an UnknownFieldException. Before it raises the error, Auto Loader infers the schema of the latest micro-batch, adds the new columns to the end of the schema in the schema location, and leaves the types of existing columns unchanged. When the stream restarts, it continues with the updated schema. This is why Databricks recommends running these streams as Lakeflow Jobs set to restart automatically. The stop is expected and temporary: you don't need to drop or recreate any table.

    Values of cloudFiles.schemaEvolutionMode and how each reacts to a new column
    ModeSchema updated?Stream behaviourWhere new-column data goes
    addNewColumns (default without a schema)Yes, new columns appendedStops with UnknownFieldException; restart resumesInto the new columns after restart
    rescueNeverDoes not fail due to schema changesThe rescued data column
    failOnNewColumnsNoFails and stays down until the schema is updated or the offending file is removedNowhere until fixed
    none (default when a schema is provided)NoDoes not fail due to schema changesIgnored, unless the rescuedDataColumn option is set

    Use rescue when a stream must never stop and must not lose data. The schema stays fixed, the stream keeps running, and unexpected fields go to the rescued data column (_rescued_data), where you can inspect them later. none also keeps running, but it drops new columns unless you configure a rescued data column. failOnNewColumns is the strict mode: it stops the stream and keeps it stopped until a person changes the schema or removes the file that caused the failure.

    Checkpoint 3 of 8· Check yourself

    An Auto Loader stream feeds a dashboard. It must never stop because of schema drift, and values in unexpected new fields must be kept for later inspection, not dropped. Which cloudFiles.schemaEvolutionMode fits?

    Checkpoint 4 of 8· Exam question

    A data engineer sets up an Auto Loader stream to ingest JSON files from a Unity Catalog volume into a Delta table, but the target table's schema is not explicitly specified in the code. To ensure Auto Loader can infer and evolve the schema automatically as new files arrive, which configuration is required?

    Checkpoint 5 of 8· Exam question

    An Auto Loader stream ingesting CSV files into a Delta table has no explicit target schema defined and uses the default schema evolution mode. After several weeks, upstream source files begin including two new columns that were not present when the stream started. What happens to the running stream?

    Checkpoint 6 of 8· Exam question

    A team ingesting semi-structured JSON logs with Auto Loader needs the stream to keep running without interruption even when the source occasionally introduces unexpected new fields, while still preserving those unexpected fields for later inspection rather than dropping them. Which cloudFiles.schemaEvolutionMode setting satisfies this requirement?

    Sources6

    4.One-off batch loads from local files

    Files on your own machine are the simplest batch source. The Create or modify a table using file upload page, under New > Add or upload data, takes CSV, TSV, JSON, Avro, Parquet or text files and creates or overwrites a managed Delta table in Unity Catalog or the Hive metastore. Lakeflow Connect accepts local files through this upload path, alongside files uploaded to a volume and files downloaded from the internet.

    The upload page has hard limits that tell you when it is the wrong tool:

    • At most 10 files per upload.
    • Total size under 2 GB.
    • Allowed extensions: .csv, .tsv (or .tab), .json, .avro, .parquet or .txt. Zip and tar archives are rejected.

    Nothing about an upload is incremental. You choose Overwrite existing table or Create new table. If you upload several files at once, their rows are appended to the target table, and the upload cannot join or merge records. The uploaded files go to an internal staging location that is garbage collected daily, so nothing remains that a later run could compare against. You can stage files without compute, but previewing and configuring the table needs an active SQL warehouse, serverless compute or dedicated compute. Group clusters are not supported. For an extract that arrives every week, land the files in a volume or in cloud storage and load them with a pattern that remembers what it has already loaded.

    Checkpoint 7 of 8· Check yourself

    Every Monday, an analyst gets a 40 MB CSV extract on their laptop. Each extract should add its new rows to one Delta table, and no row should be loaded twice. Which approach fits?

    Sources71

    5.Standard and managed Lakeflow Connect connectors

    Lakeflow Connect is Databricks' set of ingestion connectors for local files, enterprise applications, databases, cloud storage and message buses. Its connectors fall into two families. Under the Ingestion decision rule: managed connectors → standard connectors → custom/partner, you start with the most managed layer and move down only if it doesn't support your source. The two families also differ in which ingestion semantic you get and how much of it you have to build yourself.

    Standard connectors read data with Spark and SQL APIs, which gives you more control over how data is read and processed. They cover cloud object storage (S3, ADLS, GCS) through Auto Loader or COPY INTO, SFTP servers, message buses such as Apache Kafka, Amazon Kinesis, Google Pub/Sub and Apache Pulsar through Structured Streaming or Lakeflow pipelines, and Google Drive, OneDrive and SharePoint through Spark reader APIs. You choose the semantic: COPY INTO for incremental batch, or Auto Loader or a Kafka source for streaming, run either continuously or with availableNow. Lakeflow pipelines take care of the checkpoint and schema location for Auto Loader. In plain Structured Streaming you set both yourself.

    Managed connectors make ingestion incremental without any state handling on your side. They cover SaaS applications such as Salesforce, HubSpot, Jira and Workday, and databases such as SQL Server, MySQL and PostgreSQL. The first run ingests all the selected data and starts tracking changes at the same time. Each later run uses that tracking to ingest only what changed. The method depends on the source: SQL Server supports change tracking and CDC, while the Salesforce connector uses a cursor column. On top of that, managed connectors handle source-specific authentication, edge cases, automated retries and automated schema evolution. Not every source or table supports incremental ingestion yet.

    Managed database connectors mix both execution modes. An ingestion gateway runs in its own job as a continuous task and captures changes as they happen. The ingestion pipeline runs on whatever schedules you add, and Lakeflow Connect creates a job for each schedule. Every managed connector writes to streaming tables, which are Delta tables with extra support for incremental processing. Kafka, Google Drive, OneDrive and SharePoint also have managed versions alongside the standard API route.

    The ingestion semantic each layer gives you and who keeps track of progress
    LayerTypical sourcesSemantic you getWho keeps the progress state
    Managed connectorSalesforce, Workday, SQL Server, PostgreSQLIncremental through change tracking or CDC; database gateway runs continuouslyThe connector
    Standard connector, streaming APICloud object storage via Auto Loader, Kafka, Kinesis, SFTPStreaming, either continuous or triggered with availableNowCheckpoint managed by Lakeflow pipelines or by you in Structured Streaming
    Standard connector, COPY INTOCloud object storage, Unity Catalog volumesIncremental batchCOPY INTO's record of loaded files
    File uploadFiles on a local machinePlain batch (create or overwrite)Nobody

    Checkpoint 8 of 8· Check yourself

    Your team must bring SQL Server tables into Databricks. After the first load, each run should pick up only the rows that changed, and nobody wants to build or look after checkpoints or progress tracking. Lakeflow Connect has a managed connector for this source. What should they use?

    Sources189310

    Sources

    (10)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Lakeflow Connect uses incremental reads and writes to enable efficient ingestion.”
      ↩︎ Batch, incremental and streaming: what the engine remembers
      “You can ingest files that reside on your local network, files uploaded to a volume, or files downloaded from an internet location.”
      ↩︎ One-off batch loads from local files
      “Databricks recommends starting with the most managed layer.”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “source-specific authentication, CDC, edge case handling, long-term API maintenance, automated retries, automated schema evolution”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “They extend Lakeflow pipelines functionality to also include source-specific authentication, CDC, edge case handling, long-term API maintenance, automated retries, automated schema evolution”
      ↩︎ Checkpoint
    2. 2.
      “files in the source location that have already been loaded are skipped on subsequent runs”
      ↩︎ Batch, incremental and streaming: what the engine remembers
      “you can schedule it to run repeatedly, and it will only load new data into your Delta table.”
      ↩︎ Exam trap 1
    3. 3.
      “In case of failures, Auto Loader can resume from where it left off by information stored in the checkpoint location”
      ↩︎ Batch, incremental and streaming: what the engine remembers
      “You don't need to maintain or manage any state yourself to achieve fault tolerance or exactly-once semantics.”
      ↩︎ Batch, incremental and streaming: what the engine remembers
      “You do not need to provide a schema or checkpoint location because Lakeflow pipelines automatically manage these settings for your pipelines.”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “This key-value store ensures that data is processed exactly once.”
      ↩︎ Key concept
      “As files are discovered, their metadata is persisted in a scalable key-value store (RocksDB) in the checkpoint location”
      ↩︎ Checkpoint
      “Auto Loader can detect schema drifts, notify you when schema changes happen, and rescue data that would have been otherwise ignored or lost.”
      ↩︎ Checkpoint
    4. 4.
      “Processes new data on a schedule or when manually triggered.”
      ↩︎ Triggered versus continuous execution
      “Continuous: Processes new data as it arrives in the source.”
      ↩︎ Triggered versus continuous execution
      “Triggered: Processes new data on a schedule or when manually triggered.”
      ↩︎ Checkpoint
    5. 5.
      “Databricks recommends that you set a trigger mode that balances latency and cost for your use case.”
      ↩︎ Triggered versus continuous execution
      “Scheduled incremental batch processing. Processes as much data as is available at the time the streaming job is triggered.”
      ↩︎ Triggered versus continuous execution
      “Scheduled incremental batch processing. Processes as much data as is available at the time the streaming job is triggered.”
      ↩︎ Exam trap 2
    6. 6.
      “Auto Loader stores the schema information in a directory _schemas at the configured cloudFiles.schemaLocation to track schema changes to the input data over time.”
      ↩︎ Schema tracking in an incremental file stream
      “Auto Loader samples the first 50 GB or 1000 files that it discovers, whichever limit is crossed first.”
      ↩︎ Schema tracking in an incremental file stream
      “For formats that don't encode data types (JSON, CSV, and XML), Auto Loader infers all columns as strings”
      ↩︎ Schema tracking in an incremental file stream
      “Databricks recommends configuring Auto Loader streams with Lakeflow Jobs to restart automatically after such schema changes.”
      ↩︎ Schema tracking in an incremental file stream
      “Auto Loader never evolves the schema and the stream does not fail due to schema changes.”
      ↩︎ Schema tracking in an incremental file stream
      “Auto Loader records all new columns in the rescued data column.”
      ↩︎ Schema tracking in an incremental file stream
      “Stream fails and does not restart unless you update the provided schema or remove the offending data file.”
      ↩︎ Schema tracking in an incremental file stream
      “Does not evolve the schema, new columns are ignored, and data is not rescued unless the rescuedDataColumn option is set.”
      ↩︎ Schema tracking in an incremental file stream
      “addNewColumns mode is the default when a schema is not provided, but none is the default when you provide a schema.”
      ↩︎ Schema tracking in an incremental file stream
      “Stream fails with an UnknownFieldException after Auto Loader adds the new columns to the schema.”
      ↩︎ Exam trap 3
      “stores the schema information in a directory _schemas at the configured cloudFiles.schemaLocation”
      ↩︎ Exam trap 4
      “When Auto Loader detects a new column, the stream stops with an UnknownFieldException.”
      ↩︎ Prediction
    7. 7.
      “upload CSV, TSV, or JSON, Avro, Parquet, or text files to create or overwrite a managed Delta Lake table.”
      ↩︎ One-off batch loads from local files
      “supports uploading up to 10 files at a time.”
      ↩︎ One-off batch loads from local files
      “The total size of uploaded files must be under 2 gigabytes.”
      ↩︎ One-off batch loads from local files
      “Compressed files such as zip and tar files are not supported.”
      ↩︎ One-off batch loads from local files
      “Uploaded files combine by appending all data as rows in the target table.”
      ↩︎ One-off batch loads from local files
      “Imported files are uploaded to a secure internal location within your account which is garbage collected daily.”
      ↩︎ One-off batch loads from local files
      “The file upload UI supports SQL warehouses, serverless compute, and dedicated compute. Group clusters are not supported.”
      ↩︎ One-off batch loads from local files
      “Uploaded files combine by appending all data as rows in the target table. Joining or merging records during file upload is not supported.”
      ↩︎ Checkpoint
    8. 8.
      “Standard file connectors use Spark and SQL APIs, giving you more control over how files are read and processed”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “These are streaming tables, which are Delta tables with extra support for incremental data processing.”
      ↩︎ Standard and managed Lakeflow Connect connectors
    9. 9.
      “you can stream directly with Structured Streaming or Lakeflow pipelines”
      ↩︎ Standard and managed Lakeflow Connect connectors
    10. 10.
      “On the first run of your pipeline, it ingests all of the selected data from the source.”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “it uses that change tracking to ingest only the data that's changed from the prior run”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “the Salesforce connector selects a cursor column from a set list of options.”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “For database connectors, the ingestion gateway runs in its own job as a continuous task.”
      ↩︎ Standard and managed Lakeflow Connect connectors
      “Some sources or specific tables don't support incremental ingestion at this time.”
      ↩︎ Standard and managed Lakeflow Connect connectors

    Spotted a mistake, or was something unclear? Tell us.