Repository navigation
feat(lake): the attach seam for datasets — DuckLake METADATA_SCHEMA plumbed end to end - #380
Merged
Merged
Conversation
…lumbed end to end A dataset will be an independent lake inside its org's one Postgres metadata database, separated by DuckLake's METADATA_SCHEMA attach option. This lands that seam, inert: DuckLakeConfig.metadata_schema (and the er-entity-diff twin attach, kept in step), er_cli::open_lake_with, and one er-server helper (schema::open_lake_env) replacing the eight hand-rolled env->open sites. The new env key is ER_LAKE_CATALOG_SCHEMA — deliberately NOT a variant of ER_LAKE_METADATA_SCHEMA, which despite its name is the user-table schema. pg_lake_catalog_schema proves the three properties the datasets design stands on: the first attach creates the schema; two schemas in one database are fully disjoint lakes; and a schema is pinned to its DATA_PATH — re-attaching it under a different one is refused rather than silently re-pointed. Nothing sets the new key yet, so every existing lake opens exactly as before. Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 1 of the datasets program (many independent resolution domains per org — plan approved 2026-11-02). Inert: nothing sets the new key yet, every existing lake opens exactly as before.
What
DuckLakeConfig.metadata_schema→ emits DuckLake'sMETADATA_SCHEMAattach option; the er-entity-diff twin attach gains the same parameter (the two are documented as kept-in-step).er_cli::open_lake_with(catalog, data_path, catalog_schema);open_lakestays as the None wrapper.schema::open_lake_env(env)replaces the eight hand-rolledenv → open_lakesites (dispatcher ×4, handlers ×3, reconcile); the read path (read::open_org_lake) honours the key too.ER_LAKE_CATALOG_SCHEMA— deliberately not a variant ofER_LAKE_METADATA_SCHEMA, which despite its name sets the user-table schema. The ducklake-lakehouse skill (body + attach-and-tenancy reference) is updated accordingly, resolving its own recorded naming-trap TODO.Why
Each dataset will be an independent DuckLake catalog inside its org's one
er_t_<org>Postgres metadata database + its own data path, so every session keeps attaching exactly one lake aslake.main.*and the engine stays untouched.Proof
pg_lake_catalog_schema(new, behindER_TEST_PG_DSN, runs in the ducklake-e2e job) pins the three properties the design stands on:Verified locally: the new test green ×3 against Postgres 16, and
make checkgreen.🤖 Generated with Claude Code