Data engineering·Files, formats and table layers
a maintenance job rewrites thousands of small files into a few large sorted ones, and nothing about the table's contents changes.
Compaction
Also calledfile compaction, bin packing, optimize
Rewriting a table's files into fewer, larger, better-ordered ones without changing the data. It is routine maintenance on any table written incrementally, and on a lakehouse it is your job rather than the storage engine's. It is not free — it rewrites data, it costs compute, and it interacts with time travel because the old files must be retained until their snapshots expire — so it is scheduled and budgeted like any other pipeline.