Skip to main content
A dataset is an Apache Iceberg table in a REST catalog whose versions Bijection keeps: which snapshot is each version, which version is current, who holds which version, and when an unheld version retires. Your engines (Spark, Trino, DuckDB, PyIceberg) read and write the table in the catalog. Bijection writes no data files and runs no computation; it keeps the versions and governs the reads. Datasets has no SQL authoring syntax: a derived dataset is a pipeline output written as a typed relation, and a table’s partitioning, write order and properties are its declared layout. The @bijectionhq/datasets-app app owns datasets. You mount it by calling datasets(options) at a path of your tree. Only its receivers talk to the catalog and only its functions write a version or a hold. Your code calls its functions with ctx.call and submits to its targets with ctx.submit.
The Datasets app has not yet run on a deployment.

Mount the app

bijection/app.ts
The admit query is asked once per candidate and answers a boolean. The other options set retention; they change only with a deploy. Each datasets(...) call is one installation with its own ledger, roles, targets, receivers and secrets, so a tree may mount it at several paths (app({ lake: datasets(a), archive: datasets(b) })). The installation declares lake.roles.operator, which the functions the console’s Datasets panel calls allow. Grant it to whoever manages the installation:
Calls from your own code with ctx.call need no grant.

Declare a dataset

The mount above has one catalog, lake, operated by the hosting cell unless you bind it elsewhere (catalogs). Declare a dataset in it from any of your mutations:
leaseMinutes (60 when null, 15 to 720) is the longest any read of the dataset lasts. See catalogs for named catalogs, your own catalog and your own lake storage.

Publish a version

Your engine writes files and adds a snapshot to the table without moving main. Then submit to the installation’s publication target, and receive its result in a continuation:
The app asks admit, then sends one catalog commit that asserts main is still at the expected parent, moves main to the snapshot and tags it. A stale publication refuses. An answer that decides nothing is resolved by reading the table’s refs, so a version is never published twice, and the same once returns the original task. lake.versions.current, get and list read the ledger. An app reaches only the exports of the apps it mounts, so its own code calls them under a role it passed in datasets({ readers }); publishers (cuts and producer runs), erasers (legal erasure and its reach) and keepers (lake syncs) admit the other groups. A function no passed role allows stays internal to Datasets. To keep one of your tables in a dataset continuously instead, declare a sync.

View dataset erasure

A pipeline over a view relation with warehouse contributors writes sealed files grouped by the identity subject’s bucket. A contributor aligns when its view route and SQL closure key both match that subject. Aligned contributors hash the same typed subject with the same salt. The lock records the bucket count and reports the contributor’s bucket share or its whole-dataset withdrawal scope. Inherited input custody can widen the actual withdrawal. The bucket count defaults to 64. Supply row and target file-size estimates with the pipeline’s viewBuckets option to derive it from their ratio. Bijection rounds up to a power of two between 16 and 1,024. Changing the count changes the reviewed pipeline contract. Each sealed output file has a cap of 1,024 individual custody units including its warehouse bucket units and inherited input units. For an erasable local row, check counts the row’s own _id unit once and adds one unit for each distinct blind unique or natural-key address. Put an upper bound on distinct local rows per file in viewBuckets[dataset].localRows by table path. Check multiplies that bound by the table’s units per row. Datasets validates each staged file’s custody proof against the pinned input files and reports the actual per-file unit counts. End-to-end managed writer proof production is designed, not implemented. Bucketed view output staging requires those proofs. Lake custody admission of native blind address epochs is designed, not implemented. Datasets can pin and issue keys in one member frame. Set warehouseMemberFamily and grant roles.memberLakeWriter at the dataset’s exact member. Use a separate bound table and scoped input publications for that member. The authenticated lake.issueMemberRunOutput entry uses that scope for SQL pins and Lake key issue. End-to-end member dataset publishing and reading are designed, not implemented. SQL deletion consumers and erase operations close the affected bucket units. Lifetime expiry closes them when the relation has no deletion signal. Key handoff then reports erased, and custody destroys the keys within the dataset’s lease and key-lifetime bound. A rebuild can pin a new unit for a closed bucket only after the source has been observed beyond its closure cutoff. If that observation is unavailable, the writer refuses SourceRetention.

Next steps