Visual demos¶
pqbench measures Parquet footers. A file is one input. A table is a snapshot of files. The pipe is the same in every case:
$ 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
$ pqb table-file examples/quickstart.parquet | pqb bytemass | pqb format --html > /tmp/report.html
Standard output is NDJSON (Metastore, Catalog, Schema, Table,
TableFile, Blob, Column);
pqb fmt renders a table. pqb format --html draws one file's bytemass
stream as a static HTML column treemap.
The walkthroughs use the committed lakehouse fixtures under
docker/e2e-lakehouse/ and the small Parquet
fixture in the test suite. The catalog example reads PQB_ENDPOINT and
PQB_TOKEN; make lakehouse provides a local stand that exports them.
Selecting files with Unix tools¶
bytemass measures the files the list files stream names; which files is a
shell decision. The stream is one JSON record per line, so jq prunes file
records by name, and sort, head, or awk sample by name:
# one file: keep only the part-* records
$ cat docker/e2e-lakehouse/table.ndjson \
> | pqb ls files \
> | jq -c 'select(.name | contains("/files/part-"))' \
> | pqb bytemass \
> | jq -c 'select(.mass) | {column: (.name | capture("/columns/(?<c>[^/]+)$").c), compressed_bytes: .mass.compressed_bytes}' | tail -1
{"column":"label","compressed_bytes":72}
# first N by name: sort the file records, cap them, then measure
$ cat docker/e2e-lakehouse/table.ndjson \
> | pqb ls files \
> | sort | head -10 \
> | pqb bytemass \
> | jq -c 'select(.mass) | {column: (.name | capture("/columns/(?<c>[^/]+)$").c), compressed_bytes: .mass.compressed_bytes}' | tail -1
{"column":"label","compressed_bytes":72}
# every Nth file
$ cat docker/e2e-lakehouse/table.ndjson \
> | pqb ls files \
> | awk 'NR % 2 == 1' \
> | pqb bytemass \
> | jq -c 'select(.mass) | {column: (.name | capture("/columns/(?<c>[^/]+)$").c), compressed_bytes: .mass.compressed_bytes}' | tail -1
{"column":"label","compressed_bytes":72}
The list files stream carries no credentials. bytemass resolves the
table's lease for itself — a direct catalog call, with no in-process cache —
and reads the file its blob names.
A table's files¶
list files resolves a table's snapshot and names its active files, one
TableFile per line; bytemass reads each one's footer. The whole walk is two
commands:
$ cat docker/e2e-lakehouse/table.ndjson | pqb ls files | pqb list columns | 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
$ cat docker/e2e-lakehouse/table.ndjson | pqb ls files | pqb bytemass | pqb format --html > /tmp/report.html
format --html draws one file, and this fixture has one active file, so the
list columns stream above works directly.

$ 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
Catalogs¶
The catalog comes from the environment (PQB_ENDPOINT, PQB_TOKEN). The
dialect is declared, not probed: PQB_TABLE_FORMAT is unity (the default) or
iceberg. A command keeps no cache: caching (leases, tokens, catalog GETs)
and pacing are pqbench proxy's job (15/s under Unity), so a walk through many
stages points PQB_ENDPOINT at one proxy. Then the walk descends list catalogs →
list schemas → list tables, enriches each table, and lists its files:
$ export PQB_ENDPOINT=… PQB_TOKEN=…
$ echo '"CAT.SCHEMA"' | pqb ls tables |
pqb get table |
pqb ls files |
pqb bytemass | pqb fmt
Every stage of a pipe writes NDJSON for the next stage; the last one prints the
table (| pqb fmt). The local stand (make lakehouse) exports
PQB_ENDPOINT and AWS_* for the walk. See
docker/e2e-lakehouse/README.md.
One Parquet file¶
$ pqb table-file crates/pqbench-cli/tests/fixtures/small_reddit_none.parquet | pqb bytemass | pqb fmt
column type codec encoding bytes dict bytes bytes/row values
---------------- ---------- ------------ -------- ------ ---------- --------- ------
text BYTE_ARRAY UNCOMPRESSED dict 743566 738658 247.86 3000
label BYTE_ARRAY UNCOMPRESSED dict 2469 527 0.82 3000
dataType BYTE_ARRAY UNCOMPRESSED dict 360 33 0.12 3000
communityName BYTE_ARRAY UNCOMPRESSED dict 2468 527 0.82 3000
datetime BYTE_ARRAY UNCOMPRESSED dict 87 28 0.03 3000
username_encoded BYTE_ARRAY UNCOMPRESSED dict 446197 441331 148.73 3000
url_encoded BYTE_ARRAY UNCOMPRESSED dict 907117 901963 302.37 3000


One Delta snapshot¶
pqb ls files needs --features delta to read a log. The stream is
NDJSON for list files and bytemass; format renders it:
$ 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
$ cat docker/e2e-lakehouse/table.ndjson | pqb ls files | pqb bytemass | pqb format --html > /tmp/report.html


One Iceberg snapshot¶
Iceberg needs --features iceberg (iceberg-s3 for s3://). The committed
fixture stores data as s3://lakehouse/..., so measure it through the stand
(make lakehouse), not just the feature:
With the stand up, walk the Iceberg REST catalog (PQB_ENDPOINT=…
PQB_TABLE_FORMAT=iceberg) and measure through it: list tables | get table |
list files | bytemass.
docs/demos/pqbench-iceberg-session.sh runs the REST pipe when the stand answers
at localhost:8181.
Regenerate the terminal recordings¶
Install asciinema and agg, then:
That builds pqbench with --features delta (honoring CARGO_TARGET_DIR)
and records the Parquet and Delta sessions against committed fixtures.
The Iceberg REST pipe is not recorded here; it needs make lakehouse.
The table treemap GIF is one still of the format --html page. Recapture it with
docs/demos/capture-lake-treemap.sh (Chrome + ffmpeg).