Repository navigation
feat(core-spec): multi-file models, one semantic model stored as a model document plus dataset documents - #827
Open
ZmeiGorynych wants to merge 8 commits into
Conversation
…rom dataset documents in its folder
…-one-semantic-model
17 of 18 tasks
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.
Summary
Today one Ossie model is one file, so in git every dataset edit by every team member lands in the same file. This PR lets one semantic model be stored as a folder: a split model document that holds the model-level properties and lists dataset documents, one dataset each, in the same folder. This implements the "multi-file models" proposal from the dev@ thread, with the model → dataset reference direction Chris and Damian argued for.
Resolution appends the referenced datasets after any inline ones, in
dataset_refsorder, and the result is an ordinary single document. Every existing check, converter and catalog reads that resolved document unchanged: the exchange unit stays one model per document.ossie-schema.jsonis unchanged, so a consumer handed an unresolved split model fails schema validation instead of silently reading a model with no datasets.What the change adds:
Spec: a new "Multi-file Models" section in
core-spec/spec.mdcovering the two document shapes, the same-folder rule foriri(one path segment, strict percent-decoding, exact-case match, no escaping symlinks), resolution and its errors, and splitting with its round-trip property. Also updates to the Semantic Model intro,spec.yaml, and one sentence inontology/ontology.md(a mapping'ssemantic_model_refmay name a split model).Schemas:
core-spec/ossie-split-model-schema.jsonandcore-spec/ossie-dataset-schema.json, both$refing the core definitions rather than copying them.Validator:
validate.pyresolves a split model before every existing check, so--vendorand--reportsee the referenced datasets. A mapping whosesemantic_model_refis a split model is cross-checked against the resolved model. Resolution errors name the files involved:A dataset document validated on its own fails with a pointer to validate a model document that lists it. Routing applies only under the core schema; any other
--schemareads both kinds as they are. File reading for mapping references and fordataset_refsnow shares one routine, so both report problems the same way.Python SDK:
OssieSplitSemanticModel,OssieDatasetDocumentandOssieDatasetReference, plus:Example:
examples/tpcds_split/is the TPC-DS example split this way. A test in each suite pins that it resolves toexamples/tpcds_semantic_model.yaml, andmake validateand Validation CI validate it.Decisions taken on the open questions from the thread: references point from the model to its datasets;
iriis required and names a file in the same folder; relationships stay in the model document; dataset documents are recognized by their content (a top-leveldataset), and*.dataset.yamlis only a recommendation; sharing a dataset document between models is left to future work.No breaking changes: every existing document validates as before.
Related Issues
Discussion #46 (multi-file models), dev@ thread "multi-file models" (25 Nov 2026).
Checklist
Specification
core-spec/and follow the existing structure[DISCUSS]thread ondev@with a stated end date, and reach lazy consensus (or pass a[VOTE]) before mergedocs/spec_changes.mdrecords rationale, compatibility and migration impact, or the PR explains why no entry is neededOntology
ontology/are consistent with spec changesConverters
Validation
validation/are updated if the spec changedDocumentation
docs/is updated to reflect any user-facing changesCONTRIBUTING.mdis updated if the contribution process changed (unchanged)Examples
examples/are added or updated for any new spec constructsTests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy (none)