Draws each table's storage footprint as a horizontal bar: total bytes of Parquet data files, with delete files stacked in a second color, and a label giving the file count and average file size. Useful for spotting fragmentation – many small files – before it slows scans down.
Details
Requires the ggplot2 package (listed in Suggests). File statistics come
from get_table_info(). Tables whose rows are still inlined in the
catalog have no data files yet and show an empty bar; run
flush_inlined_data() to write them out. Many small files can be
compacted with merge_adjacent_files(), and a large delete-file share is
a sign to run rewrite_data_files().
Examples
if (FALSE) { # \dontrun{
# File counts and sizes for every table in the lake
plot_table_files()
# Customize the result like any ggplot
plot_table_files() +
ggplot2::theme_classic()
} # }
