Delta Lake
Who this is for:
Architecture / Concept Overview: Delta Lake
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
flowchart LR
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
A[Raw Sources] -->|Ingest| B[Bronze Layer]
B -->|Cleanse & Validate| C[Silver Layer]
C -->|Aggregate & Enrich| D[Gold Layer]
D -->|Serve| E[BI / ML / Apps]
A:::source
B:::ingestion
C:::processing
D:::storage
E:::serving
*Delta Lake powers the medallion architecture, providing reliability guarantees at every layer from raw ingestion through curated analytics.*
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
graph TD
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
DL[Delta Lake] --> TXN[ACID Transactions]
DL --> SCHEMA[Schema Enforcement]
DL --> TT[Time Travel]
DL --> MERGE[Upserts via MERGE]
DL --> STREAM[Unified Batch & Streaming]
DL --> OPT[Optimisation & Compaction]
DL:::storage
TXN:::processing
SCHEMA:::governance
TT:::source
MERGE:::ingestion
STREAM:::serving
OPT:::processing
*Core capabilities of Delta Lake that together deliver a reliable, performant lakehouse storage layer.*
Key Terms
Prerequisites and Setup
- A Databricks workspace on AWS, Azure, or GCP with Unity Catalog enabled
- A cluster running Databricks Runtime 13.3 LTS or later (Delta Lake is included)
- Basic familiarity with PySpark DataFrames and Spark SQL
CREATE TABLEandMODIFYpermissions on the target catalog and schema
Step-by-Step Implementation
Configuration Reference
| Property | Default | Description |
|---|---|---|
delta.enableChangeDataFeed | false | Enables Change Data Feed for downstream CDC consumers |
delta.logRetentionDuration | 30 days | How long commit history is preserved |
delta.deletedFileRetentionDuration | 7 days | Minimum age of files eligible for VACUUM |
delta.autoOptimize.optimizeWrite | true | Coalesces small files on write |
delta.autoOptimize.autoCompact | true | Triggers background compaction after writes |
delta.tuneFileSizesForRewrites | true | Adjusts target file size during OPTIMIZE |
delta.enableDeletionVectors | true | Marks rows as deleted without rewriting files |