Delta Lake MERGE deep dive: stop rewriting your table
See exactly which files a MERGE rewrites, then watch partition pruning cut a 300 GB rewrite down to 4 GB.
Summary
The companion video to the MERGE article: we run the naive merge, read the Delta transaction log to see the rewrite, then apply target pruning, source dedupe and compaction step by step — measuring the file counts after each fix.
What you'll learn
- Reading
DESCRIBE HISTORYand the transaction log to see what MERGE really did - Writing pruning predicates that the optimizer can actually use
- When deletion vectors change the game
Go deeper
- Full article: Delta Lake MERGE without the full-table rewrite
- Practise: Build an SCD Type 2 with MERGE
Keep going
Delta Lake MERGE without the full-table rewrite
Why MERGE quietly rewrites far more data than it changes, and the three fixes that keep it fast: prune the target, deduplicate the source, compact after.
Delta Lake MERGE: Five Upsert Patterns and How to Make Them Fast
The five Delta MERGE patterns (upsert, insert-only, newer-wins, deletes, full sync), the errors that break them, and how to make them fast.
Deduplicate Late-Arriving CDC Rows with MERGE: A Worked Problem
A CDC feed sends duplicates and out-of-order changes. Build a MERGE that keeps the latest row per key, ignores late events and is safe to replay.