Ingesting batch and streaming data from notebooks
Azure Databricks notebooks can ingest data in both batch and streaming modes using Apache Spark APIs, letting you read from cloud storage, files, or streaming sources into DataFrames for processing. Auto Loader (cloudFiles) and Structured Streaming are the primary tools for scalable, incremental ingestion directly from notebooks, while spark.read is used for one-time batch loads.
1 · Learn the must-know
- Auto Loader (format('cloudFiles')) incrementally and efficiently processes new files as they arrive in cloud storage, tracking state to avoid reprocessing and supporting schema inference/evolution.
- Batch ingestion typically uses spark.read.format(...).load(path) for a static, one-time read of files (CSV, JSON, Parquet, Delta, etc.) into a DataFrame.
- Streaming ingestion uses spark.readStream with a defined or inferred schema, and writeStream with a checkpointLocation to enable fault-tolerant, exactly-once processing.
- Streaming queries require a trigger (e.g., processingTime, availableNow) and an output mode (append, complete, update) appropriate to the transformation being performed.
- COPY INTO is a simpler, idempotent SQL-based alternative to Auto Loader for batch-loading new files into a Delta table, tracking already-loaded files automatically.
- Notebooks can mix batch and streaming logic in the same session, but streaming cells run continuously until stopped, canceled, or the cluster terminates, so care is needed when scheduling jobs that include streaming writes.
2 · Check your understanding
A data engineering team needs to continuously load newly arriving JSON files from a cloud storage container into a Delta table. The volume of files is expected to grow into the millions, and the team wants the ingestion job to automatically detect and apply new columns that appear in the source files over time, without performing a full directory listing on every run. Which approach should the team implement in a Databricks notebook?
What you have tried across DP-750's objectives, not a readiness score.
Set up and configure an Azure Databricks environment15-20% of the exam0 of 13 tried
Secure and govern Unity Catalog objects15-20% of the exam0 of 12 tried
Prepare and process data30-35% of the exam0 of 28 tried
Deploy and maintain data pipelines and workloads30-35% of the exam0 of 24 tried
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.