packages/dex-core/tests/ossie/fixtures/, named by its case id. The corpus runs
offline against the bundled schema, and an automated test refuses a claim on this
page whose case does not exist.
The pinned schema
dex vendors the upstream schema verbatim and pins it by content hash. Nothing at runtime needs a checkout of Apache Ossie.
The pin is on content and not on the version string, because the schema declares
version as a constant that upstream does not move when the schema changes. The
same hash appears in the loader, in the bundled
exmergo_dex_core/ossie/schema/PROVENANCE.md, in the corpus manifest, and in the
table above; an offline test asserts all four agree.
maintain snapshot records the same hash as the layer’s format_version, so a
baseline taken under one pin and compared under another reports
semantic_format_changed rather than a layer of changed definitions. A baseline
written before dex recorded the hash carries none, and that is “unrecorded”, not
a change.
Under this pin a document is one semantic model, flat at its root:
version, name, description, ai_context, datasets, relationships,
metrics and custom_extensions. The earlier semantic_model list of models is
gone upstream, and dex refuses a document still written that way with a rule of
its own (wrapped_document) whose message names the migration: move the model’s
properties to the root, remove semantic_model, drop any root-level dialects
and vendors, and split a file holding several models into one document per
model, each listed in semantic.ossie.files. dex does not rewrite the file for
you. Case: wrapped_document_refused.
The upstream documents in examples/ and compliance/portability/ at the pinned
commit are vendored into the corpus under fixtures/upstream/, and each one is
asserted to load with no error and no warning.
Required extras
[ossie] deliberately does not pull [sql]. Structure and integrity decide
whether a document is readable at all and are pure plus one validator; expression
syntax is a third layer that rides on a dependency a warehouse install already
has.
What is accepted
What is checked, and how hard
Three severities, and they are not three strengths of one verdict. An error means dex could not read the document, which is then absent from the layer. A warning means dex read it and has something to say about what it found. A note means dex read it and is saying what it did not check.
Two of those are dex’s own rules rather than upstream’s, marked accordingly in
the corpus manifest: cross-file semantic-model uniqueness, since dex composes a
configured set of documents where upstream validates one at a time, and the
dedicated refusal of the wrapped shape, which upstream reports as a schema
error.
Upstream’s validator also checks a few things dex does not yet: that a metric
expression names fields as
dataset.field (a warning upstream), that a field
expression does not shadow another field, and the dataset-scoped metric rules
(an unqualified field of its own dataset only, and one namespace shared by a
dataset’s fields and metrics). The last group is tracked as #957.
What validation proves, and what it does not. There is no external validator
here the way dbt parse is for dbt: neither apache-ossie nor
apache-ossie-dbt is published, and there is no Ossie runtime to load a document
into. A document that passes is schema-valid and internally consistent. That is
not a claim that any consumer can execute it, and no dex surface says otherwise.
Which expression dex reads
An Ossie expression states a portablesql form, one expression per dialect
under dialects, or both. Dialect is an open string: any non-empty token is
valid, and OSSIE_SQL_2026 is the one dialect the specification defines. dex
reads only SQL: OSSIE_SQL_2026 and ANSI_SQL (both parsed with sqlglot’s
default dialect, as upstream’s validator parses them), SNOWFLAKE, DATABRICKS
and BIGQUERY. Selection is deterministic:
- the active connector’s own Ossie dialect, where the document declares one;
- otherwise
OSSIE_SQL_2026, from the top-levelsqlfirst, since upstream makes it authoritative over anOSSIE_SQL_2026entry indialects; - otherwise
ANSI_SQL; - otherwise the first other SQL dialect in declaration order.
dialect_selection, dialect_selection_falls_back_to_portable,
ossie_sql_2026_top_level_sql_links.
Every other token, whether upstream’s registry names it (MDX, TABLEAU,
MAQL, SIGMA, THOUGHTSPOT, DAX, HOLISTICS_AQL) or not, is preserved
verbatim, never parsed, never a source of a physical column, never reported as
SQL-validated, and named in the document’s non_sql_dialect note. A bare token
in MAQL that looks like a column identifier means something else entirely, so
reading one would be worse than reading none. Cases:
non_sql_dialects_are_metadata, opaque_dialects_are_metadata.
The physical link, and therefore the PII gate
A field resolves to a warehouse column only when both conditions hold: the dataset’s source is a relation this connector can address, and the field’s selected expression is a bare identifier. Everything else carries no column.
Case:
physical_linkage_is_direct_only, which asserts the resulting link table by
equality rather than containment. A link too few costs a screening; a link too
many screens the wrong column and reports the verdict as evidence-backed.
PII linkage follows exactly this table. A dimension dex cannot resolve to a
column is screened by the name heuristic and says so, rather than being screened
against a column that is not behind it. The policy that linkage feeds is in
pii-policy.md.
Name resolution: keys and relationships name fields
Upstream’s Name Resolution gives every name in a document one meaning, and dex follows it:
So a field
customer_id defined as o_custkey is a key or a join on the column
o_custkey, and that is the column explore relationships --verify,
explore profile --use-project, maintain grain and maintain semantic read.
Field names are compared case-insensitively, as upstream compares them. Case:
renamed_field_keys.
A key or relationship naming something that is not a declared field of its
dataset is an integrity error: “metrics and relationships do not reach through a
dataset to its source columns”. Case: key_names_source_column_refused.
A key or relationship any of whose fields links no physical column (a computed
field, a quoted identifier, a non-SQL-only field) is opaque as a whole: it
stays declared in the document, is named in the declarations channel’s notes,
and is never verified or probed. A composite is never checked on part of its
tuple. Case: computed_field_key_is_opaque.
The snapshot keeps both names. A key’s resolved columns are what drift compares
against the warehouse, and a relationship’s fingerprint covers both the fields it
names and the columns they resolve to, so renaming either a field or the column
behind it is drift.
Keys, relationships, snapshots, and authoring
adversarial_composite is the case worth reading. Its child tuples are
(1, 10, 100) and (2, 20, 200), its parent tuples (1, 20, 200) and
(2, 10, 100). Every column overlaps independently, so a probe that measures one
column at a time reports a healthy join three times over; no complete tuple
matches, so the join finds nothing. The two sides are named differently so that
copying one side’s columns onto the other cannot pass, and every field is named
differently from its column, so a relationship read as columns rather than fields
cannot pass either.
Dataset-scoped metrics are read into the catalog, named dataset.metric, with
lineage to their dataset when they name one of its fields. Their own integrity
rules, a per-metric fingerprint, and authoring are #957; until then a change to
one is drift on its dataset, whose fingerprint covers the whole dataset.
Declarations
Model declarations (a dbt mart’s grain, population, and what each column is) reach a native Ossie layer through the same derivation hook the other semantic layers implement. Two routes:- Derived. In a repository that pairs a dbt project with an Ossie layer,
transform plan(andtransform declare) on a declared mart proposes an Ossie dataset for it underdata.semantic_proposal. - Annotated.
semantic ossie define|update|planaccept adeclarationspayload beside (or instead of)edits, each naming a dataset the payload or the layer already defines, and render it into that dataset field by field.
Decisions behind the mapping:
- A composite grain is a composite
primary_key, not aunique_keysentry. The grain is the dataset’s row identity, upstream’sprimary_keytakes a list, and the SLayer and Cube derivations put every grain column on the primary key too.unique_keysstays for further, independent keys. - The
primary_keyis what exploration reports as the grain, at either arity.explore profile|map --use-projectreport it withdeclaration.grain_status, ahead of a measured key. Aunique_keysentry is measured bymaintain grainand is never the grain. A declared key that never held isdeclared_grain_not_unique, notkey_lost_uniqueness. ai_context.dexis read back, as untrusted text. It reachesdeclarationon the dataset’s relation, and a malformed part is left out and named innotes. Fields are reported under the physical column they link, and a field linking none is named instead.ai_context, nevercustom_extensions.custom_extensions.datais an opaque string, and a declaration encoded into a string inside YAML cannot be reviewed in a diff.ai_contexttakes an object with any further keys, so the declaration stays structured. The one writer ofcustom_extensionsis the Ossie bridge, which writes the converter’s ownDATABRICKSentry so a document it writes reads back through the converter.- A population is metadata, never a filter. Ossie has no filter on a dataset or a metric, and the dataset sits on the mart, whose SQL already enforces it.
- Nothing is guessed.
median(no portable aggregate) andsemi_additive(no exact Ossie equivalent) are named as limitations rather than rendered, and no metric beyond a declared measure is invented. - Grain columns name fields. On the annotate route a grain column must be exposed by a declared field; one that is not is refused, naming the column, so the field is authored first.
data.semantic_proposal.plan_id); apply both. Where the parents span documents,
no document is configured, or the mart’s relation already has a dataset, it is
proposed or skipped with the reason, and a proposal is a new document of its
own with the dex config set semantic.ossie.files that adopts it. A dataset name
another definition holds fails the derivation rather than being renamed. If a
new document’s derived path is already listed in semantic.ossie.files, it is
included as a companion plan even when the file does not exist yet; no
configuration change is needed.
Every derived or annotated document passes the same checks a hand-authored one
does (schema, integrity, expression syntax, the cache) before a plan is stored.
What Ossie does not carry, declared rather than absent
These are properties of the format, not of how far the implementation got, and they arrive in the catalog’sunavailable block rather than as empty fields a
caller would read as facts about the layer.
Ossie is a semantic layer and never a transformation project.
project.format: ossie is refused rather than translated, and the reader satisfies none of the
project tiers: it owns no model graph, no compilation, no targets, and no dbt
write surface. A repository may have dbt beside Ossie, Ossie alone, or dbt alone.
What dex does not claim
- No converter interoperability. dex reads Ossie documents; it does not convert them to or from another semantic format, and says nothing about what another tool would make of one.
- No execution assurance. A document that validates here is schema-valid and internally consistent. Whether any engine can execute it is a separate question dex has no basis to answer.
- Missing SQL validation is disclosed, not passed. Without
[sql]the expression layer does not run and the document says so. That note is the absence of a check, not a check that succeeded. - A warning is not a partial refusal. A document that warns is read in full.
Known deltas from upstream’s current schema
Upstream moves; the pin does not, until somebody moves it deliberately.
Resolved by this pin, and no longer deltas:
THOUGHTSPOT and every other dialect
token are accepted, since Dialect is an open string (the case once called
post_pin_thoughtspot_is_refused is now opaque_dialects_are_metadata), and
upstream’s validator now requires a relationship’s two arrays to have equal
length, as dex always did.
Upgrading the pin
- Copy the new
core-spec/ossie-schema.jsonin verbatim. - Update the commit, hash, and declared version in
PROVENANCE.md, inSCHEMA_SHA256inexmergo_dex_core/ossie/loader.py, in the corpus manifest’sschema:block, and in the table on this page. - Run the corpus. Read every case whose verdict moved, decide for each one whether the new verdict is what upstream now intends, and record it in the changelog with the behavior it changes.
- Update the tables on this page for anything that moved, and re-check the known-deltas list: a delta upstream has adopted stops being a delta.
references/ossie-compatibility.md (edit on main). This page is generated; change the source, not the site.