Introducing a new way to review your PRs.

Read the announcement

open-metadata / openmetadata

The Open Context Layer for Data and AI , OpenMetadata is the open platform for building trusted data context and business semantics for humans, AI assistants, and agents.

View on GitHub

26 documents · Updated Nov 23, 2026

docs / ontology-rdf-operations

Ontology and RDF operations

Ontology and RDF operations give catalog data a shared formal meaning. They support native ontology models, glossary relationships, governed drafts and releases, links from concepts to catalog assets, RDF exchange, graph queries, SHACL checks, and inference across service, schema, UI, and MCP surfaces. The semantic knowledge graph gives the wider graph context; RDF indexing and storage explains the graph serving layer.

Semantic model

The semantic model separates formal ontology meaning from catalog terms and from live catalog data. An ontology supplies stable identifiers and rules. Bindings connect those identifiers to assets without changing the released model.

Ontology namespaces

An ontology is a governed namespace for formal content. It supplies an identity and a namespace for stable concept and property identifiers, with optional prefixes and layer data. A name can change without changing the semantic identity of the concept or property. Absolute namespaces and unique prefixes keep service, RDF, and UI views aligned.

References: openmetadata-spec/…/ontology.json• L1-90 openmetadata-service/…/OntologyIriMinter.java• L20-53 openmetadata-service/…/OntologyLayerValidator.java• L25-49

Concepts and properties

An ontology concept represents a formal class or SKOS concept. An ontology property describes a link, value, or note. Properties can express domain, range, inverse, chain, disjointness, and superproperty rules. These definitions are separate from glossary terms and glossary relationship types.

Subclass axioms provide parent and child views. References resolve within the owning ontology, so an identifier alone does not select a global definition.

References: openmetadata-spec/…/ontologyConcept.json• L1-114 openmetadata-spec/…/ontologyProperty.json• L1-165 openmetadata-service/…/OntologyReferences.java• L22-59 openmetadata-service/…/OntologyPropertyMapper.java• L9-31

Concept bindings

A concept binding connects a formal ontology concept to an authorized catalog asset. For a table, it can also connect a data or object property to an exact nested column path. This gives formal meaning to live catalog data without changing ontology content. Bindings are operational metadata, so they can change as assets change.

Binding writes use revisions and validate the asset, ontology, property domain, and column path. Reads show only live targets visible to the caller. A column binding can be unresolved when its column or property no longer matches. The same binding model supports live-data query plans, native data graphs, and RDF links.

Binding links use the caller's permissions at read time. The explore graph adds bounded boundAsset links after its graph data is loaded and marks the response when more links exist. RDF projection uses active-release IRIs for concepts and properties and catalog IRIs for assets and columns. An unresolved column produces no RDF column edge.

References: openmetadata-service/…/OntologyConceptBindingService.java• L91-181 openmetadata-service/…/OntologyConceptBindingService.java• L209-345 openmetadata-service/…/OntologyBindingGraphLinks.java• L21-110 openmetadata-service/…/RdfConceptBindingMapper.java• L17-67 openmetadata-service/…/OntologyConceptQueryService.java• L96-220

Axioms and expressions

An axiom states a formal fact or rule about concepts, properties, or individuals. Supported content includes class hierarchy, equivalence, disjointness, assertions, restrictions, and cardinality expressions.

Structure checks validate expression shape and named references. They reject reserved vocabulary changes, unknown definitions, subclass cycles, unsupported data types, and unsafe property chains. These checks define a supported structural profile. They do not prove full logical consistency.

References: openmetadata-spec/…/ontologyAxiom.json• L1-120 openmetadata-spec/…/ontologyExpression.json• L1-92 openmetadata-service/…/OntologyExpressionShape.java• L10-47 openmetadata-service/…/OntologyStructureValidator.java• L36-95

Relationship types

A glossary relationship type gives a directed link a shared meaning. It can define an RDF predicate, inverse, domain, range, cardinality, characteristics, chains, and disjointness. A term relation uses that type to connect business concepts.

Relationship checks protect both catalog behavior and RDF meaning. They reject incompatible characteristics, invalid limits, bad inverse rules, unknown chain members, and dependency cycles before a type is used.

References: openmetadata-spec/…/relationshipType.json• L61-153 openmetadata-service/…/RelationshipTypeValidator.java• L23-105 openmetadata-service/…/RelationshipTypeGraphValidator.java• L28-145

Ontology packs

An ontology pack is a versioned bundle of related RDF modules. The pack catalog verifies module identity, checksums, dependencies, and dependency cycles. A sample gives the UI a bounded view of concepts and direct relations before installation.

Pack installation is separate from native ontology authoring. A review compares selected modules with the current working draft and returns counts, item status, a change preview, or a disjointness clash without persistence. A confirmed install runs as a background job in dependency order. The job can be polled, cancelled after its current slice, and resumed after failure or cancellation. Installation requires edit access to the target ontology and create access for definition kinds that the pack adds.

References: openmetadata-service/…/OntologyPackCatalog.java• L28-79 openmetadata-service/…/OntologyPackVerifier.java• L35-75 openmetadata-service/…/OntologyPackSampler.java• L49-99 openmetadata-service/…/OntologyPackInstallJobManager.java• L1-246 openmetadata-service/…/OntologyResourceAccess.java• L34-63

Authoring and publication

Authoring keeps proposed semantic changes separate from the active model. Working drafts collect typed changes. Release capture seals a checked working revision, and publication makes that revision available to downstream graph reads.

Working drafts

A change set is a durable list of typed operations with an undo point. Native ontology drafts change concepts, properties, and axioms within one ontology. Glossary drafts change terms, relations, and mappings. Native imports and pack installs use the same guarded operation path as other draft changes.

The apply path checks scope and base versions before writing. Application is atomic: a failed operation rolls back earlier work and skips later work. Draft reads require edit access to the ontology. Other callers read the active release.

The authoring flow is:

flowchart LR
    A[Working draft] --> B[Typed changes]
    B --> C[Scope and version checks]
    C --> D[Atomic apply]
    D --> E[Reviewable working ontology]

References: openmetadata-spec/…/ontologyChangeSet.json• L1-101 openmetadata-service/…/NativeOntologyChanges.java• L16-131 openmetadata-service/…/OntologyChangePreflight.java• L39-65 openmetadata-service/…/OntologyChangeApplicationService.java• L90-183 openmetadata-service/…/OntologyResourceAccess.java• L83-176

Release capture and publication

An ontology release is an immutable snapshot of one ontology and its formal members. Capture reads one authorized working revision, stores canonical content, and records a digest. Readers use this sealed content instead of mutable working rows.

Publication checks release notes and the expected latest-release revision. Approval binds to the captured release identity and digest, so later working edits cannot change the review target. Publication status shows the active release, latest release, release under review, and unpublished change count. A review decision also creates an Inbox activity notice for the author. A notice failure does not undo the committed decision.

Release validation combines structure checks, native SHACL checks, and deprecation impact. Activation moves the active pointer, records audit evidence, and queues graph projection. Selecting an older approved release is an audited rollback.

flowchart LR
    A[Working revision] -->|capture| B[Sealed release]
    B --> C[Validation and review]
    C -->|approved| D[Active release]
    D --> E[Native ontology RDF graph]
    B --> F[Release comparison]

References: openmetadata-service/…/OntologyWorkingSnapshot.java• L23-137 openmetadata-service/…/OntologyReleaseCapture.java• L32-85 openmetadata-service/…/OntologyReleaseValidationService.java• L63-113 openmetadata-service/…/OntologyReleaseActivation.java• L22-111 openmetadata-service/…/OntologyDecisionNotice.java• L18-83 openmetadata-spec/…/ontologyRelease.json• L1-152

RDF exchange

RDF is both the graph form and the exchange form of the semantic model. Glossary operations remain catalog-backed. Native ontology release export reads a verified release, so uncommitted working edits do not appear as published RDF.

RDF import

RDF import accepts Turtle, RDF/XML, N-Triples, and JSON-LD. Native ontology import also accepts a strict CSV form for ontology, concept, property, and axiom rows. Format detection uses content before a file extension, and callers can set the format explicitly.

Glossary import maps RDF meaning into terms, hierarchy, mappings, attributes, and typed relations. A dry run shows the planned result. Native import compares a normalized source document with one working snapshot and returns a change-set preview. It does not change the active ontology directly.

The canonical native CSV form has a fixed header and strict row values. RDF and CSV sources normalize to the same native document before comparison. Unsafe contexts, external RDF/XML declarations, relative identifiers, named graphs, unsupported statements, and oversized input are rejected at the trust boundary.

References: openmetadata-service/…/NativeOntologyRdfImporter.java• L83-162 openmetadata-service/…/GlossaryRdfImporter.java• L89-108 openmetadata-service/…/NativeOntologyCsvCodec.java• L14-70 openmetadata-service/…/NativeOntologyCsvReader.java• L37-120 openmetadata-service/…/OntologyFormatDetector.java• L12-81 openmetadata-service/…/SafeRdfModelParser.java• L18-79

RDF export

Glossary export builds an ontology document from catalog data. It includes terms, mappings, hierarchy, used relationship types, and preserved annex data. Callers can choose Turtle, RDF/XML, N-Triples, or JSON-LD.

Native release export writes concepts, properties, axioms, restrictions, chains, inverse properties, mappings, and release identity with OWL and SKOS meaning. It can add current authorized asset links as operational metadata. Draft export reads working content without storing a release, so it does not change release history. The optional SHACL gate validates a release before rendering its file; it does not approve or activate the release.

References: openmetadata-service/…/GlossaryOntologyExporter.java• L57-83 openmetadata-service/…/OntologyReleaseExporter.java• L11-29 openmetadata-service/…/OntologyReleaseProjection.java• L36-67 openmetadata-service/…/OntologyExportGate.java• L7-19 openmetadata-service/…/OntologyResource.java• L671-715

RDF vocabulary

RDF writers declare the role of each IRI so OWL clients do not need to guess. Fixed RDF, RDFS, OWL, XSD, and SKOS vocabulary keeps standard meaning stable. OpenMetadata vocabulary adds terms for units, identifier intent, abstract concepts, relationship characteristics, and concept mappings.

The database remains authoritative for native definitions and glossary data. Native ontology entities are not part of the generic metadata graph; they appear through the active release graph. The bundled canonical OpenMetadata ontology can be serialized in a supported RDF format or reduced to a focused class or property entry for vocabulary discovery. A focused class entry includes inherited class context and properties that apply to it. A focused property entry includes that property's description.

References: openmetadata-service/…/OwlEntityDeclarations.java• L27-35 openmetadata-service/…/OntologyRdfVocabulary.java• L13-45 openmetadata-service/…/OntologyDocument.java• L30-109 openmetadata-service/…/OntologyTermEntry.java• L35-139 openmetadata-service/…/OntologyActiveGraph.java• L58-74

Live RDF projection

The serving graph follows the live catalog and does not retain soft-deleted nodes. Entity and relationship changes enter an ordered durable write queue after the metadata transaction. A cluster-wide writer replays current state, retries failures, and marks projection health as degraded when a write reaches a dead-letter state.

Relationship scope decides which catalog edges enter RDF. Lineage uses canonical upstream, downstream, and PROV predicates. Restore planning re-adds edges and references only when both ends are live. Concept bindings are owned by the asset projection: the asset write replaces or removes its binding edges as needed.

References: openmetadata-service/…/RdfUpdater.java• L108-131 openmetadata-service/…/RdfLiveWriteStore.java• L25-78 openmetadata-service/…/RdfLiveWriter.java• L28-35 openmetadata-service/…/RdfConceptBindingMapper.java• L17-67 openmetadata-service/…/RdfRelationshipScope.java• L24-65

SPARQL querying

SPARQL lets callers ask questions about RDF classes, properties, and links. Query scope controls what a caller can read. Glossary queries use one glossary model, native ontology queries use the active release by default, and the general RDF endpoint serves the wider dataset under stronger controls.

Scoped queries

Glossary-scoped SPARQL is read-only and does not accept caller-selected graphs. It supports SELECT, ASK, CONSTRUCT, and DESCRIBE with bounded NONE, RDFS, or OWL inference. Native ontology queries default to the approved active release and exclude working edits. The ontology resource can query the working draft when the caller has ontology edit access.

The general RDF endpoint adds whole-dataset reads and controlled SPARQL updates. It applies access, federation, capacity, and timeout checks. SQL-over-RDF is an administrator-only convenience that translates SQL to SPARQL.

References: openmetadata-service/…/OntologySparqlQueryService.java• L34-115 openmetadata-service/…/OntologyReleaseQuery.java• L17-50 openmetadata-service/…/OntologyResource.java• L191-257 openmetadata-service/…/RdfResource.java• L1227-1468 openmetadata-spec/…/sparqlQuery.json• L1-48

Agent queries

The MCP agent SPARQL surface is a stricter read-only contract. It accepts one query string, fixes the dataset and graph scope, and permits only SELECT. It rejects graph selectors and federation, then returns bounded results with stable error codes and request IDs.

Agent authorization applies to the RDF dataset as one policy resource. It does not add owner, tag, domain, persona, or row filters to results. A client that needs narrower access must use a narrower query scope or query predicate.

References: openmetadata-mcp/…/AgentSparqlTransport.java• L32-110 openmetadata-service/…/RdfQueryResourceContext.java• L23-53 openmetadata-service/…/RdfResource.java• L1310-1398

SHACL validation

SHACL checks whether RDF data follows declared graph shapes. It differs from ontology structure validation: SHACL checks graph data, while structure validation checks the declarations and expressions that define the vocabulary. Catalog and native ontology shapes are separate.

Validation is read-only and administrator-only. An entity scope checks one subgraph; no scope checks the full dataset. Import can use the validator in report or enforce mode. Reports retain conformance, warning counts, violation counts, and truncation state even when findings are bounded. Native release validation binds shapes to the captured concept and data-property IRIs.

References: openmetadata-service/…/RdfShaclValidator.java• L30-72 openmetadata-service/…/NativeOntologyValidation.java• L38-80 openmetadata-service/…/RdfShaclReportMapper.java• L31-79 openmetadata-service/…/RdfResource.java• L373-406 openmetadata-spec/…/rdfValidationReport.json• L1-73

Inference workflows

Inference adds facts that follow from graph relations. Validation checks conformance instead. The service supports bounded query-time inference for scoped queries and durable materialization for configured custom rules.

Query-time inference

Glossary and ontology-scoped SPARQL can request no inference, RDFS inference, or OWL inference. The result stays within the permitted graph scope and is bounded by query time and output limits. Custom rule inference is reserved for the administrator knowledge-graph path.

References: openmetadata-service/…/OntologySparqlQueryService.java• L78-113 openmetadata-service/…/OntologyReleaseQuery.java• L17-50

Materialized inference

Materialized inference computes derived triples from durable custom rules and stores them for later reads. Rule changes mark the derived graph dirty. A run recomputes the rule bundle and must reach a fixed point. Overlapping runs or unstable inputs leave the rules dirty for retry. Live RDF writes also invalidate reasoning freshness when delivery bypasses the normal queue or becomes degraded.

Inference explanations show whether a statement is asserted or produced by a rule. They are glossary-scoped and require the RDF store for proof inspection.

References: openmetadata-service/…/InferenceMaterializer.java• L26-117 openmetadata-service/…/RdfResource.java• L409-520 openmetadata-service/…/RdfUpdater.java• L246-259 openmetadata-service/…/OntologyReasoningResource.java• L43-111

Service and client surfaces

The service, schemas, UI, and MCP expose one semantic model to different callers. The service owns access and state changes. Schemas define shared contracts. The UI supports human authoring and exploration. MCP supports bounded agent discovery and read-only graph actions.

Service API

The ontology resource is the main control surface for native ontology state. It exposes draft and release queries, working state and diffs, imports, exports, release capture, reviews, activation, data graph pages, pack review, and pack installation jobs. Concept, property, and axiom resources own native definitions. Glossary resources own glossary RDF actions. RDF resources own graph status, SHACL, inference, and general SPARQL.

Concept resources also own bindings, delete-impact checks, and bounded SQL generation for bound data. Definition list and write paths use the draft access rule, so callers do not receive working content from an ontology they cannot edit.

References: openmetadata-service/…/OntologyResource.java• L191-537 openmetadata-service/…/OntologyResource.java• L569-764 openmetadata-service/…/OntologyConceptResource.java• L67-236 openmetadata-service/…/OntologyPackResource.java• L84-147 openmetadata-service/…/RdfResource.java• L324-371

Schema contracts

Schemas define shared names and shapes for ontology roots, concepts, properties, axioms, releases, change operations, IRIs, references, review targets, RDF formats, bindings, and validation results. They keep native definitions distinct from glossary terms and release identity distinct from mutable working state.

Changes to release state, revisions, binding revisions, operation kinds, RDF format names, pack job states, or report counts can affect service, UI, and agent clients together.

References: openmetadata-spec/…/ontology.json• L1-90 openmetadata-spec/…/ontologyConcept.json• L61-114 openmetadata-spec/…/ontologyRelease.json• L76-150 openmetadata-spec/…/ontologyPackInstallJob.json• L1-100

UI exploration

The ontology explorer gives people a graph view of concepts, relationships, and linked catalog assets. It supports global, glossary, and term scopes. Model mode shows meaning first. Data mode adds authorized assets around selected concepts. Search, filters, hierarchy views, selection panels, export, and bounded loading support both discovery and focused review.

Bound-asset links are permission-filtered and deduplicated. The graph marks truncated results when the bounded link read cannot include all assets. Inverse and symmetric relationships appear as one meaningful visual connection while their direction stays available in relation details.

References: openmetadata-ui/…/OntologyExplorer.tsx• L291-355 openmetadata-ui/…/useOntologyExplorer.ts• L911-1136 openmetadata-ui/…/useGraphData.ts• L138-290 openmetadata-service/…/OntologyBindingGraphLinks.java• L47-110

UI authoring and bindings

The concept inspector lets an authorized editor add or remove typed relationships, add external mappings, and link concepts to data assets. The asset picker searches the catalog by type and scope. It reports partial batch results so rejected links remain visible to the editor.

Relationship creation shows available types, inverse labels, scope warnings, and server-side checks before sending a change. Relation details expose source, target, provenance, status, and inference explanation. Edits and deletes remain limited to edit mode.

References: openmetadata-ui/…/OntologyAuthoringInspector.tsx• L216-355 openmetadata-ui/…/OntologyDataAssetPicker.tsx• L260-305 openmetadata-ui/…/RelationshipTypePicker.component.tsx• L217-323 openmetadata-ui/…/OntologyRelationDetailsPanel.tsx• L295-429

MCP tools

MCP provides agent-facing ontology description, SPARQL, and SHACL tools. Ontology description can use the bundled vocabulary without a live RDF store. It can return the full vocabulary or a focused term entry. SPARQL and SHACL need RDF support, and RDF-dependent tools are advertised only when RDF is enabled.

The tools keep responses bounded so status fields remain visible when query or report content is large. They help an agent learn the vocabulary, ask controlled graph questions, and inspect conformance without changing ontology content.

References: openmetadata-mcp/…/OntologyDescribeTool.java• L27-127 openmetadata-service/…/OntologyDocument.java• L42-106 openmetadata-service/…/OntologyTermEntry.java• L49-69 openmetadata-mcp/…/SparqlQueryTool.java• L27-101 openmetadata-mcp/…/ShaclValidateTool.java• L25-109 openmetadata-mcp/…/McpServer.java• L87-114

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep ontology schemas aligned with property rules, draft operations, structure checks, release capture, and RDF projection.
  • Keep working revisions, release digests, review targets, active releases, publication status, and activation revisions aligned across publication and graph refresh.
  • Keep binding revisions, asset checks, property domains, nested column resolution, permission filtering, graph truncation, and RDF binding predicates aligned.
  • Keep active-release export, draft export, optional current asset links, and the SHACL export gate distinct.
  • Keep native RDF and CSV normalization aligned with format detection and draft planning.
  • Keep pack checksums, dependencies, selection order, install job state, cancellation, resume behavior, and installation authorization aligned.
  • Keep fixed RDF vocabulary declarations and focused vocabulary descriptions aligned with the bundled ontology.
  • Keep native ontology entities outside the generic graph and publish them through the active release graph.
  • Keep live projection health, queue state, binding-owned asset writes, SPARQL scope, inference freshness, and MCP tool advertisement aligned.
  • Keep SHACL conformance, warning counts, violation counts, and truncation state available when findings are bounded.
  • Keep UI inverse-edge display, relationship warnings, binding outcomes, and graph truncation aligned with service responses.

Important failure modes

TriggerConsequenceGuard
A draft or release uses a stale revisionThe change is rejected instead of replacing newer stateReload the current state and submit a new guarded request
A binding points to an unreadable asset, invalid column path, wrong property kind, or wrong domainThe binding is rejected or shown as unresolvedRecheck the live target, exact path, and same-ontology property
A bound column no longer resolvesNo RDF boundColumn edge is projectedRebind the property to an existing exact column path
An explore graph has more bound assets than its limitThe response is partialRead the truncation marker and request a narrower graph or binding page
A release has invalid structure or native shape findingsIt cannot be approved, activated, or passed through the export gateRun release validation and inspect the sealed release content
A review notice fails after a decisionThe author may not see an Inbox notice, but the decision remains committedRead the release decision state from the release workflow
RDF storage or projection is not readyNative queries, SHACL actions, or materialized inference are unavailable or staleCheck RDF status, projection health, queue lag, and rebuild state
A SPARQL request exceeds scope, federation, capacity, or time limitsThe query is rejected even when its syntax is validUse the scope's allowed form and limits
Materialized inference overlaps another run or does not reach a fixed pointDerived facts remain dirty and are not completeWait for the active run and retry when inputs are stable
An agent sends a non-SELECT query or assumes asset-level filteringThe MCP request fails or returns dataset-level resultsUse the strict SELECT contract and scope the query itself
A native import contains unsafe RDF content or invalid CSV rowsThe payload is rejected before it becomes a draftUse approved RDF contexts or the canonical CSV form

Key files

FileWhy to read it
openmetadata-service/…/OntologyResource.javaMain ontology API for drafts, releases, imports, exports, queries, and pack jobs.
openmetadata-service/…/OntologyConceptBindingService.javaConcept-to-asset and property-to-column binding rules, visibility, paging, and hydration.
openmetadata-service/…/OntologyBindingGraphLinks.javaPermission-aware bound-asset links added to explore graphs.
openmetadata-service/…/RdfConceptBindingMapper.javaRDF projection of concept, asset, property, and column binding edges.
openmetadata-service/…/OntologyChangeApplicationService.javaGuarded and atomic draft application.
openmetadata-service/…/OntologyReleaseCapture.javaConversion of working content into immutable release content.
openmetadata-service/…/OntologyReleaseActivation.javaApproval, activation, rollback, audit, and graph refresh.
openmetadata-service/…/OntologyPackInstallJobManager.javaBackground pack installation and job recovery behavior.
openmetadata-service/…/NativeOntologyRdfImporter.javaNative RDF and CSV import matching and draft planning.
openmetadata-service/…/OntologyReleaseProjection.javaProjection of the active release into RDF.
openmetadata-service/…/OntologyDocument.javaFull and focused serialization of the bundled ontology vocabulary.
openmetadata-service/…/OntologyTermEntry.javaSelection of the focused class or property vocabulary entry.
openmetadata-service/…/RdfLiveWriteStore.javaOrdered live projection delivery and health state.
openmetadata-service/…/InferenceMaterializer.javaDurable custom-rule inference and freshness behavior.
openmetadata-ui/…/OntologyExplorer.tsxUser-facing graph scopes, model and data views, export, and loading states.
openmetadata-ui/…/OntologyAuthoringInspector.tsxHuman authoring of relations, mappings, and asset links.
openmetadata-mcp/…/OntologyDescribeTool.javaAgent vocabulary discovery surface.
openmetadata-mcp/…/AgentSparqlTransport.javaBounded agent SPARQL contract.