DE Mastery GitHub

Lakehouse & open table formats · LKH-05

Table layout & maintenance

From your world. Redshift VACUUM / SORTKEY, and the small-files problem on Athena

Practice quiz with instant feedback. For a scored run that counts toward your local progress, use uv run de quiz LKH-05.

1A streaming job commits to an Iceberg table every few seconds. It produces tens of thousands of tiny data files. Queries have become slow. Which maintenance operation directly fixes this?
2You run expire_snapshots with retain_last => 5 but no older_than. Disk usage barely drops, and this surprises you. Why?
3Which Iceberg feature is the closest equivalent of a Redshift SORTKEY? It clusters rows, so that a predicate can skip whole data files with their min/max statistics.
4A teammate partitions a 10-billion-row events table by order_id "so the data is spread out". What goes wrong?
5A table uses Iceberg hidden partitioning on days(event_ts). How should an analyst filter to one day, and why?
6You need to change an append-only table from unpartitioned to partitioned by days(ts). You want no full table rewrite. What does Iceberg let you do?
7expire_snapshots deleted the data files of old snapshots. But some files from an aborted write still remain, and no snapshot references them. Which operation removes those files?