Databricks - Data Engineer Professional Study Guide

    2: Data Ingestion & Acquisition

    This chapter covers ingestion engineering for the Databricks Data Engineer Professional exam: matching format readers and message-bus connectors to the right ingestion mechanism, configuring Auto Loader for cloud object storage, and building append-only pipelines that serve both batch and streaming workloads against Delta tables. The treatment focuses on production decisions around schema handling, exactly-once writes, file detection modes, and the trade-off between Spark Structured Streaming and Lakeflow Spark Declarative Pipelines streaming tables for Bronze ingestion.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Design and implement data ingestion pipelines to efficiently ingest a variety of data formats including Delta Lake, Parquet, ORC, AVRO, JSON, CSV, XML, Text and Binary from diverse sources such as message buses and cloud storage.
    • Create an append-only data pipeline capable of handling both batch and streaming data using Delta.

    Executive Summary

    • Auto Loader is the default Bronze ingestion mechanism for cloud object storage; it tracks ingested files via RocksDB state, supports schema inference plus four evolution modes, and operates in directory-listing or file-notification mode depending on object-volume.
    • Message-bus ingestion (Kafka, Kinesis, Event Hubs, Pub/Sub) writes binary payloads into a Bronze Delta table; the schema of the payload is decoded downstream rather than at the connector boundary.
    • Format coverage on Databricks splits into self-describing columnar formats (Delta, Parquet, ORC, AVRO), semi-structured row formats (JSON, CSV, XML), and opaque formats (Text, Binary). Each has distinct schema, partitioning, and pruning behaviour that affects ingestion code.
    • An append-only Delta pipeline relies on idempotent writes, monotonic checkpoint advancement, and availableNow triggers to unify batch and streaming code paths against a single sink.

    Assumptions

    • Code samples assume Unity Catalog is the active metastore and tables are addressed as catalog.schema.table; Hive Metastore syntax is treated as legacy.
    • File-path examples target a Unity Catalog external location backed by S3, ADLS Gen2, or GCS; the cluster has the required storage credentials granted through STORAGE CREDENTIAL plus EXTERNAL LOCATION.
    • The reader is comfortable with the Spark DataFrame API, Structured Streaming triggers, and basic Lakeflow Spark Declarative Pipelines syntax from the previous chapter.
    • Configuration values quoted as defaults reflect the runtime versions referenced in the official Databricks documentation linked at the end of the chapter.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account