Skip to main content
Engines read a dataset from its catalog. Bijection grants each read as a lease on one version, lasting at most the dataset’s leaseMinutes. A lease is fixed when it is granted and never renewed; a longer read opens a new one. The version is held for the lease.

Read an exact snapshot from your app

Submit to the installation’s read target for a version (number, or the current one with number: null). principal names who receives the read, for its reach record:
A granted read carries: Read the snapshot VERSION AS OF the tag. A read refuses Refused when the table no longer tags the version’s snapshot, when the version was redacted, or when it was written before a later erasure of the dataset.

Name where the read goes

When the caller hands a read to another system (a copy job, a partner), it names that system in destination, for example destination: "spark:nightly". Every read writes a permanent reach record in the commit that grants it: the version, snapshot, principal, destination, storage prefixes and lease end. ctx.call(lake.reaches.list, { dataset, number }) lists them.

Read from an engine’s catalog connection

An engine whose Iceberg catalog client loads tables through Bijection (the Java client in sdks/application/java-iceberg) asks for a lease at table load, in two requests to the installation’s routes:
  1. POST <site>/<d>/lake/leases with { namespace, table, catalog }, catalog naming the declared catalog the table is in (or { dataset, number, release, releaseLease }) answers at once: 202 with { ticket }, or 401, 403 or 404 with { code, message }.
  2. POST <site>/<d>/lake/leases/answer with { ticket } answers 200 with the decided lease, 403 with the message, 202 while the table load is still in flight, or 404 for an unknown or expired ticket.
<d> is the installation’s path (lake in app({ lake: datasets(...) })). Both requests are session-verified and must come from the same principal; the reach record names it. The engine asks the second request again until it is no longer 202. The answer outlives a dropped connection, so a retry with the same ticket returns the same lease.

Sealed files

In a sealed catalog (the default) every data file is encrypted with its own key, and the key is released only under a live lease:
  • An engine with Iceberg table encryption resolves each file’s key metadata through a Bijection key client with the lease token: bijection.lake for PyIceberg (install the lake extra), or the Iceberg Java client in sdks/application/java-iceberg. The key service is POST <site>/<d>/lake/keys/release with the caller’s Bijection session or service token.
  • An engine without table encryption reads through the hosting cell’s decrypting read gateway, GET <gateway>/v1/lake/<deployment>/<object key> with Authorization: Bearer <lease token> and an optional Range.
Both stop serving within seconds of the lease ending or the data being erased. A catalog registered with sealed: false holds plaintext; its reads refuse when the catalog’s vended credentials would outlast the lease.

Hold versions for a read

A dataset hold keeps the Iceberg snapshot readable beyond its normal retention for a job longer than one lease. This extends the published version in the catalog. The source database’s history window is independent:
The hold’s task settles when the hold ends: released (holds.release({ dataset, number, holder })), expired (its days, at most the installation’s maxHoldDays) or redacted (an erasure wins over holds). A hold can outlive its task’s within; holds.list({ dataset, number }) shows it until it ends.

Select a complete publication

A run that reads several datasets pins one version of each in one transaction:
owner is the calling app’s stable name; it alone may grant run reads on the cut. With basis: null (transitive), the cut is the greatest consistent basis among retained versions, each root dataset at one version; basis: "perInput" pins the current versions and reports whether they are consistent. The cut holds its versions for minutes (360 when null, at most a day). Pass barrier: { kind: "release", release } to pin the exact versions of a Datasets release, naming all of its datasets in inputs. The run reads each pinned version through lake.read, publishes its outputs to lake.publication with cut and select: false, and makes a group of outputs current at once through lake.selection. lake.cuts.release({ cut }) ends the cut’s holds.