Work with Delta Lake Tables in Microsoft Fabric
Work with Delta Lake Tables in Microsoft Fabric
Source
- Provider: Microsoft
- Platform: Microsoft Learn
- Source title: Work with Delta Lake tables in Microsoft Fabric
- Source URL: https://learn.microsoft.com/en-us/training/modules/work-with-delta-lake-tables-in-microsoft-fabric/
- Content type: Self-Paced Training Module
- Target Exam: Exam DP-700
- Date captured: 2026-08-15
- Last reviewed: 2026-08-15
Summary
This module focuses on the inner mechanics of Delta Lake storage in Microsoft Fabric: transaction logging (_delta_log/), ACID compliance, time travel, schema enforcement/evolution, table optimization commands (OPTIMIZE, V-ORDER, VACUUM), and Liquid Clustering.
Core Architectural Mechanisms
1. Delta Transaction Log (_delta_log/)
- Every transaction creates an atomic JSON commit log file (
000000.json,000001.json). - Every 10 commits, a checkpoint
.checkpoint.parquetfile is compiled to speed up log replay. - Enables single-source-of-truth concurrency, preventing dirty reads and conflicting writes.
2. Time Travel & Version History
-- View audit history of changesDESCRIBE HISTORY fact_sales;
-- Query specific historical versionSELECT * FROM fact_sales VERSION AS OF 3;
-- Query historical timestampSELECT * FROM fact_sales TIMESTAMP AS OF '2026-08-01 10:00:00';
-- Restore to an earlier versionRESTORE TABLE fact_sales TO VERSION AS OF 2;3. Maintenance & Performance Tuning Operations
| Operation | Command Syntax | Purpose |
|---|---|---|
| Compaction (Bin-packing) | OPTIMIZE fact_sales; | Merges small parquet files into optimal ~1GB file sizes. |
| V-Order Application | OPTIMIZE fact_sales VORDER; | Applies columnar sorting optimized for VertiPaq & Direct Lake. |
| Z-Ordering | OPTIMIZE fact_sales ZORDER BY (CustomerID); | Collocates related data across multidimensional space. |
| Garbage Collection | VACUUM fact_sales RETAIN 168 HOURS; | Deletes historical files older than retention period (default 7 days). |
| Liquid Clustering | ALTER TABLE fact_sales CLUSTER BY (Region, Date); | Replaces static partitioning and Z-Order with flexible, auto-tuning clustering. |
Exam Traps & Gotchas
[!CAUTION]
- VACUUM vs Time Travel: Running
VACUUMpermanently removes physical parquet files beyond the retention threshold. Once vacuumed, time travel queries attempting to read those versions will fail withFileNotFoundException.- Zero-Duration Vacuum Danger: Overriding retention checks (
SET spark.databricks.delta.vacuum.parallelDelete.enabled = trueorspark.microsoft.delta.vacuum.relinquishCheck = true) can corrupt concurrent transactions if set below the retention safety limit.