Declare catalogs
A Datasets mount declares its catalogs by name in code. With no declaration it has one,lake:
iceberg-rest@1 protocol,
at <datasets>.catalogs.<name> (here lake.catalogs.lake and
lake.catalogs.reporting). The catalog’s writer and its select-only reader are
two credential roles of that one slot, so they always belong to the same
operator. Code declares the namespace, sealing and
checks on snapshot references. The installation’s binding chooses the
provider and its warehouse.
Sealed or plaintext
A catalog is sealed by default: its writer encrypts every data file under a key Bijection issues and holds, and reads release keys only under a lease (sealed files). Declare a catalog whose writer cannot seal files withcatalog({ sealed: false }). Its reads reach plaintext, are
refused when its vended credentials outlast the lease, and are recorded like
every other read.
Managed catalog (Lakekeeper)
An unbound catalog slot uses Bijection’s managed Lakekeeper, an Iceberg REST catalog. Lakekeeper allocates a warehouse for the catalog. Only the catalog’s lake role reads and writes its private bucket. Data files are sealed: each is encrypted with its own key, released only under a read lease. Bijection expires snapshots no version tag keeps, deletes the files only they reached and removes orphans (maintenance). A managed catalog needs no credential: the installation signs every catalog request, and the managed catalog’s Iceberg REST endpoint verifies that signature and derives the tenant from it. To keep files in your own S3 bucket while Bijection operates the catalog, configure the managed provider’sstorage parameter in the installation’s
binding. Iceberg metadata records the warehouse’s absolute paths. If you
supply a KMS key, grant access to the catalog’s storage role in its key policy.
Read a managed catalog
Open a read lease for a version and pass its catalog configuration and credentials to your engine, or publish a view for engines that read the catalog directly. There is no standing catalog login: every read is a lease with a reach record.Your own catalog
Bind the catalog slot to a provider declared withicebergRest. For
lake.catalogs.reporting, the provider configuration can look like this:
url is the catalog’s REST root, the path before /v1. warehouse names
the catalog’s warehouse, and Bijection reaches it at <url>/v1/<warehouse>.
When your catalog’s GET /v1/config?warehouse=<name> answers a different
prefix, such as a Lakekeeper warehouse ID, pass it as prefix and Bijection
reaches <url>/v1/<prefix> instead. url, warehouse and prefix may be
env("NAME"); with an environment url, list the catalog’s host in hosts.
credentials names the secrets of the catalog’s two roles, the writer and the
select-only reader; set them with
bijection secret set lake.catalogs.reporting.writer and
bijection secret set lake.catalogs.reporting.reader. The two must differ:
Bijection presents the reader’s secret for every read and the writer’s for
every write. Give the reader a select-only principal. Your catalog brings its
own storage. To reach a catalog on a private network, configure the
provider’s network.
credentialPresentation selects how Bijection presents both secrets. The
default is a bearer token. Use { kind: "header", name } for a named HTTP
header, { kind: "awsSigV4", service: "glue" } with region for AWS Glue’s
Iceberg REST endpoint, or { kind: "clientCertificate" }. For SigV4, each
secret holds an AWS session. For a client certificate, each secret holds a PEM
certificate chain followed by its private key.
Your catalog, your maintenance
Bijection runs no snapshot expiry, orphan removal or object version deletion on a catalog you operate; it only removes its version tags. Schedule those with your engine (run maintenance with Spark).Move a catalog
To switch catalogs for a synced table, declare the destination catalog and move the dataset. For files in a catalog you operate, follow your maintenance and erasure obligations.Declare a dataset
leaseMinutes and an optional table layout.
catalogs.list lists the mount’s catalogs. create, list, get and all
allow the installation’s roles.operator from outside; installer code calls
them with ctx.call. create refuses UnknownCatalog, TableConflict,
InvalidLayout and the other codes it declares.
Declare a table layout
The dataset’s producer creates its Iceberg table.layout records how: the
partition spec, the write order, Z-order fields, identifier fields, table
properties and per-field metadata. Datasets validates and keeps it, and
catalogs.get returns it to the producer. Datasets writes no table rows or
schema itself.
Call
create again with a different layout to change it: the new declaration
replaces the old one, and the producer evolves the table to it. A field’s
type, nullability and values come from the producer’s typed output, not from
the layout. Write a new required field’s value with constant(…) from
@bijectionhq/library-relations in the producer’s .pick.
Datasets has no SQL authoring syntax. Write builds as
pipelines on the typed builder, write rows into
datasets through typed tables and a table sync, and keep or name a version with
holds and consumer views.
Move a synced dataset
A synced dataset’s catalog and table are fixed per sync generation.ctx.call(lake.syncs.move, { dataset, catalog, table }) (table null keeps
it) starts a new generation in another declared catalog or
table; the writer backfills it, and the switch is the one ledger commit that
moves the dataset. Versions in the old catalog stay readable while held. With
tableSync({ into: { dataset, catalog } }), naming a different catalog than
the dataset’s moves it the same way when the sync is attached.
Retire one dataset
versions.retire({ dataset, number }) retires one version early. It refuses
NotRetirable while the version is current, kept, held or in a current
version’s cut, and UnknownVersion for a version that does not exist.
Retirement removes the version’s tag. No entry deletes a dataset’s table:
dropping it is your catalog’s operation.