Databricks - Data Engineer Associate Study Guide

    2: Data Ingestion and Loading

    This chapter covers how data lands on the Databricks Data Intelligence Platform through batch, incremental, and streaming paths. It walks through COPY INTO, Auto Loader, Lakeflow Connect standard and managed connectors, JDBC and REST ingestion patterns, ingestion-method selection, and the handling of semi-structured and unstructured payloads, all targeted at Unity Catalog-governed Delta tables.

    Learning Objectives

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

    • Enable and detail ingestion patterns (batch, streaming, incremental) and import data from sources such as local files and Lakeflow Connect standard and managed connectors.
    • Use COPY INTO to incrementally load files from cloud object storage (ADLS / S3 / GCS) into Unity Catalog-governed tables.
    • Use Auto Loader with schema enforcement and schema evolution in batch modes (directory listing or file notification) to land data into Unity Catalog-governed tables.
    • Configure Lakeflow Connect to reliably ingest data from diverse enterprise sources into Unity Catalog-governed tables.
    • Use JDBC/ODBC or REST clients in notebooks to land data into cloud storage or directly into Unity Catalog-governed tables, typically orchestrated with Lakeflow Jobs.
    • Prioritize between Auto Loader, Lakeflow Connect (standard and managed connectors), partner connectors, and other ingestion methods based on data volume, frequency, types, and governance needs.
    • Ingest semi-structured and unstructured data (for example JSON and nested data) into Unity Catalog-governed Delta tables.

    Executive Summary

    • Ingestion on Databricks splits into three operating models: batch (one-shot full loads), incremental (only new files or rows since the last run), and streaming (low-latency continuous arrival). Each maps to specific primitives.
    • COPY INTO is a SQL command that tracks already-loaded files in the Delta target's transaction log, making it a good fit for periodic incremental loads of bounded file volumes.
    • Auto Loader (cloudFiles) is the Structured Streaming source that discovers new files via directory listing or cloud notification queues and supports schema inference, hints, and evolution at scale.
    • Lakeflow Connect provides managed ingestion connectors for enterprise sources (Salesforce, Workday, SQL Server, ServiceNow, SharePoint, and others) and standard connectors for SaaS APIs, writing into Unity Catalog-governed bronze tables with checkpoints and lineage handled for you.
    • JDBC, ODBC, and REST clients in notebooks remain the escape hatch for sources without a managed connector, typically orchestrated through Lakeflow Jobs with secrets stored in Databricks-backed scopes.

    Assumptions

    • The reader has completed Chapter 1 and is familiar with the lakehouse split between control plane and data plane, Delta Lake mechanics, Unity Catalog three-level namespace, and the compute lineup.
    • Code examples assume a catalog named prod_dlh, schema bronze, and a Unity Catalog external location backed by an S3, ADLS Gen2, or GCS bucket called s3://acme-landing/ or its equivalent path.
    • All file paths and table identifiers are fictional; substitute real values when running.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account
    4. Free with account
    5. Free with account
    6. Free with account
    7. Free with account
    8. Free with account