dat0
dat0
.dat0 format · v1 (draft)

§1 Chunk 00 — DATA

File-native at scale — the DATA chunk carries the workflow's source data by reference or by value, so a multi-gigabyte Parquet behaves like a small one. Designed, not shipped.

DATA0x0100

In development. This format is designed, not shipped. Nothing to install yet — join the waitlist.

The DATA chunk carries the workflow's source data — by reference when the source is a file, by value when it's small. dat0 reads a Parquet, a CSV, or another data file directly where it sits on disk: there is no load step, no upload, no import. You point at the file and start asking questions.

Why it matters

The size of the file stops being the thing you plan around. A 12-gigabyte Parquet is meant to behave like a 5-megabyte CSV: you scroll it, filter it, and aggregate it at the speed you'd expect from something small. The work happens on your machine, against the bytes already on your disk — nothing leaves, nothing waits on a network round trip. In the concept story, the DATA chunk references a 12.4 GB Parquet source.

Reading a file directly

A query names the file as if it were a table. No schema to declare first, no ingest job to run:

SELECT count(*) FROM 'events.parquet';

The same shape works for a slice or a rollup — group, filter, and order straight over the file:

SELECT country, count(*) AS events
FROM 'events.parquet'
GROUP BY country
ORDER BY events DESC;

The file header

Every artifact opens with a fixed header — the file magic, a draft version, the chunk count, a flags word, and a pointer to the chunk directory. The DATA chunk follows, opening with a magic of its own:

Hex dump of the .dat0 file header and the start of the DATA chunk. The header opens with four bytes spelling DAT0 — the file magic — then a draft version of one, a chunk count of five, a flags word whose low bit marks the sealed state, two reserved bytes, and a thirty-two-bit pointer to the chunk directory. The DATA chunk then opens with four bytes spelling DATA, its payload length, an encoding byte selecting parquet reference, and the source-footer fingerprint prefix where lineage anchors.

The header fields, field by field:

fieldtypenotes
magic4 bytes"DAT0" — the file identifier (the Parquet PAR1 / PNG signature convention)
versionu16 LEformat version — 1 (draft); bumps on any breaking change
chunk_countu16 LEchunks after the header — five in the draft anatomy
flagsu16bit 0 = sealed — a sealed artifact is complete and replayable
reserved2 byteszero — readers ignore, writers zero
directory_offsetu32 LEabsolute offset of the chunk directory (the ZIP central-directory convention)

Every chunk header is the same fixed shape — magic, payload length, encoding, reserved — so the reader contract never changes from chunk to chunk. The DATA chunk's payload is the source reference itself: an encoding byte selecting parquet-ref, csv-inline, or pg-ref, plus the source-footer fingerprint. Lineage entries in chunk 04 address ranges of this chunk by that fingerprint and a byte range, so provenance survives rewrites of the artifact — §5 picks up that thread.

Continue to §2 Chunk 01 — TRANSFORMS.

On this page