Cross-file views — at1 crossview

Cold archives pile up as one .at1per unit — per branch, per meter, per day. CROSSVIEW builds a manifest-aware UNION of those files (cashup_*.at1 → view cashup) and queries them as a single table. Because the manifest records each file's min/max per column, a filtered query prunesevery file whose range can't match — so you read the few files that could contain a hit, not the whole archive. The files stay as they are; the view is just a read layer, and each underlying .at1 is still verified-lossless on its own.

Use it

# build a per-file min/max manifest over a dir of .at1 files
at1 crossview build-manifest ./archive

# list the views the name patterns resolved to (cashup_*.at1 -> cashup)
at1 crossview views ./archive

# query across all matching files as one table (min/max pruning skips files that can't match)
at1 crossview query ./archive "SELECT SUM(total) FROM cashup WHERE date = '2026-07-14'"

# see which files the query will read and which it pruned, and why
at1 crossview explain ./archive "SELECT * FROM cashup WHERE branch = 7"

What it gives you

  • One logical table — a directory of per-unit files unioned by name pattern, queried with a SELECT-only SQL subset (WHERE / GROUP BY / aggregates / ORDER BY / LIMIT).
  • Skip what can't match — pruning fires on numeric columns and on ISO-date/timestamp string columns, so a query filtered to one date or one branch opens only the overlapping files.
  • Explain the planexplain shows which files it will read and which it pruned, so you can see the skip working before you trust it.

Honest scope: the pruning win depends on your files being range-separableon the columns you filter — one file per day prunes hard on a date filter, but a value spread evenly across every file can't be skipped and the query reads them all. The right measure is explain on your own archive. Validated on synthetic per-unit archives; partner acceptance is pending.

Part of the AT-1DB verifiable-data platform. See the Cross-File Views product page.

← CLI reference