mdcode: binding profiles design doc (proposed) - #357
Merged
libei merged 7 commits intoAug 29, 2026
Conversation
Proposes binding profiles for semantic models: keep one logical model and swap its physical binding (sources, columns, keys, deployment target) at push time via named profiles. Written as the user guide first, marked Status: proposed, to iterate on before implementation.
Remove antithesis appositions and empty intensifiers per the house writing checklist.
…tive Describe the capability directly (drop today-vs-tomorrow framing), lead with the one-ontology operational-vs-analytical story from the OSI Extended proposal, use URI sources and bare-string expressions, and note partial binding as under consideration.
Reframe the profile contract around declaration (logical, base-owned) vs binding (physical, per-profile), and add the availability rule: a metric, action, relationship, or traversal is available under a profile only when every field it depends on is bound there, unbound propagating up the dependency graph. Distinguish an unbound field from a data null, make leaving a field unbound explicit, and rework the example so a field is bound under one profile and absent under the other.
…in the example Title becomes "One logical model, many physical bindings". The worked example now shows a standalone logical model file (declarations, grain, graph shape, metrics — no physical facets) and two binding files in a profiles directory (BigQuery and Spanner), so the decoupling of logical and physical is the thing on display. Grain and join columns name fields and stay in the logical model; bindings carry only source, column, and deployment target.
…d-neutral The multi-file split is one layout; a binding can also sit inline in the logical model, and a single-binding model needs nothing more. Genericize product references in the structural prose (warehouse / operational store) while the example keeps its concrete BigQuery and Spanner bindings.
Retitle "One model, many stores" to "Why a model gets more than one binding" so it no longer echoes the document title. Reframe the section so operational and analytical are one illustration among several axes (different backends, environments, physical layouts); a profile is a named binding whose meaning is the author's to decide.
libei
marked this pull request as ready for review
August 29, 2026 16:35
This was referenced Aug 29, 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.
What
Adds
toolbox/mdcode/docs/semantic-model/profiles.md— a proposed design for binding profiles on semantic models, written as the user guide first so we can iterate on how it reads before building.Marked Status: proposed; nothing is implemented and the README nav is untouched.
The idea
Keep one logical model; swap its physical binding at push time via named profiles.
defaultprofile). A profile is a subclass in the identical schema carrying only its deltas;kcmd push --profile <name>deep-merges it onto the base (matched byname) and deploys the union.source, field columns, keys, and the deployment target — never labels, dimensions,ai_context, or metrics. Guarantee: switching profiles moves the data but never changes what the model means.<model>.profiles/, so a profile can be edited, reviewed, and owned in isolation.--profile(which binding) is orthogonal to the existing--target bq|kc(which destination);default_profile:incatalog.yaml; newkcmd profilesto list.Scope notes
deployment_target:key (oldGOOGLEcustom-extension form still accepted).Draft for review of the design/wording; implementation to follow.