Getting started¶
pqbench measures how a Parquet file spends bytes and how well codecs
compress it. It reads the footer, not the pages, so it is fast on files of any
size. Every command writes a typed pqbench.v1 document, so commands compose on
pipes: list files names a table's active files, bytemass measures them,
and format --html draws one file's columns as a treemap.
This page is a guided first run. It uses the committed
examples/quickstart.parquet smoke sample and
the lakehouse fixtures under docker/e2e-lakehouse/. For an exhaustive command
reference, read CLI reference.
Install¶
Install the released pqbench binary (Linux and macOS, x86_64 and arm64):
curl -LsSf https://github.com/pqbench/pqbench/releases/latest/download/pqbench-cli-installer.sh | sh
Supported targets and the release process are in Distribution.
To build from source instead:
Measure one file¶
bytemass reports the on-disk bytes each column takes. On a terminal
an aligned table; on a pipe, NDJSON.
$ pqb table-file examples/quickstart.parquet | pqb bytemass | pqb fmt
column type codec encoding bytes dict bytes bytes/row values
------ ----- ------------ -------- ----- ---------- --------- ------
id INT64 UNCOMPRESSED dict 102 80 12.75 8
year INT32 UNCOMPRESSED dict 68 46 8.50 8
The metadata walk¶
A table is one snapshot's log and active files. The walk lists a table's active files, then measures them:
$ cat docker/e2e-lakehouse/table.ndjson | pqb ls files | pqb bytemass | pqb fmt
column type codec encoding bytes dict bytes bytes/row values
------ ---------- ------ -------- ----- ---------- --------- ------
id INT64 SNAPPY dict 66 37 22.00 3
label BYTE_ARRAY SNAPPY dict 72 43 24.00 3
Reading a Delta or Iceberg log needs its cargo feature (delta / iceberg;
delta-s3 / iceberg-s3 for s3://). A missing feature fails at runtime and
names itself. See Delta tables and
Iceberg tables.
Draw the result¶
format --html draws one file's bytemass (list columns) stream as a flat
column treemap. No server, no build step:
The page lands at /tmp/report.html; open it in a browser. See format.
Where to go next¶
- Commands — the CLI reference documents every command; Documents and Authentication are separate pages.
- Real jobs on real data — Showcases triages a file's bytes, picks a codec, and verifies a layout change, on public datasets.
- More walkthroughs — Visual demos has Parquet, Delta, Iceberg, and catalog pipes with real output.
- Tune a layout — lint reports rewrite candidates; format --html shows where an existing table's bytes go.