Skip to main content

Map an ontology to physical data

Give agents versioned physical names and join declarations without giving the Ontology service warehouse credentials.
An ontology binding maps one immutable ontology release to user-declared physical identities. A binding can name tables, views, fields, registered transformations, governed joins, or a read-only SQL-backed relation. The extension validates and versions those declarations. It does not connect to a source, verify that a physical name exists, generate executable SQL, or run a query.
Preview. An administrator must install both the Ontology and Ontology Binding extensions before these routes, artifact kinds, Studio pages, and MCP tools are available.

Before you start

Set the Gateway URL, bearer token, workspace, and exact Ontology release. Core Registry release IDs use the rel_... form.
The examples use Snowflake names, but qualified names are source-neutral strings. SQL-backed relations support ansi, big_query, databricks, postgres, and snowflake dialects.

Use the Data bindings view

Open Ontology Studio, select an ontology with a published release, then choose Data bindings. The view can:
  1. Create a binding family pinned to an exact Ontology release.
  2. Add object, property, and link mappings.
  3. Describe a direct table or view, or a SQL-backed virtual relation.
  4. Validate the complete mapping graph.
  5. Publish and inspect immutable binding releases.
  6. Preview the context an agent receives.
  7. Export or import portable binding JSON.
Saving a mapping appends a draft version. Existing releases remain pinned to the versions they published.

Create a binding family

The binding root records the exact logical release, a physical source scope, and its compatibility policy:
The policy can be none, backward_compatible, or full_compatible.

Add an object mapping

An object mapping pins one exact logical object version and declares its physical relation and row grain:
The extension treats the qualified name as governed metadata. It does not look up CUSTOMER_DB.C360.CUSTOMERS in Snowflake.

Declare a SQL-backed relation

Use a query-backed relation when the logical object is implemented by a bounded read-only query rather than one table or view:
The extension parses and versions the declaration. The calling agent or query gateway remains responsible for execution with customer-controlled credentials. A property mapping connects a logical property to a field:
Create it with POST /registry/v1/artifacts/ontology_property_binding. A registered transformation can instead name a transformation and its output field. A link mapping connects two object mappings through one or more governed property-binding pairs:
Create it with POST /registry/v1/artifacts/ontology_link_binding. Validation checks that the mappings resolve, the logical endpoints agree, and joined logical property types are compatible.

Validate and publish

Build source_versions from the exact root and mapping versions returned by Registry. Each item contains kind, artifact_id, version_ordinal, and content_hash.
Publish only the validated versions:
The native operation appends an immutable publication snapshot to the binding root and releases that exact version through Core Registry. List or read it through:

Retrieve bounded mapping context

The response pairs logical definitions with their released physical mappings. Pass ontology_release_id to test reuse against a newer release of the same ontology. Reuse succeeds only when every referenced logical resource keeps its exact version and content hash. An MCP client reaches the same read-only operation as ontology_binding__get_context.

Export a portable binding

Export one exact binding release as deterministic, credential-free JSON:
The document uses logical API names rather than environment-specific artifact IDs. It contains physical declarations, but no credentials or source data. A release containing legacy artifact-based physical references cannot be exported portably; append qualified physical names and publish a new release.

Import portable binding JSON

Preview the document against one exact destination Ontology release:
Apply the unchanged valid preview:
Apply recomputes the preview and creates the binding root and every mapping in one Registry transaction. It creates drafts and does not publish a binding release. Preview and apply never contact a physical source.

Verify the boundary

Before handing a binding release to an agent, verify:
  • Both the Ontology and binding release IDs are exact rel_... handles.
  • Validation returned is_valid: true for the versions you published.
  • The binding response carries both manifest digests.
  • Qualified physical names and SQL declarations contain no credentials.
  • The calling agent or executor uses a separately governed source connection.

Publish a logical model

Define and publish the logical resources that a binding references.

Get binding context

Give an agent bounded logical definitions and released physical mappings.