Skip to content

RDF ontology/SHACL describe om:fromColumn/om:toColumn as column IRIs but the projection writes literals; om:hasChildColumn mislabelled InferenceOnly #34864

Closed

Description

@fmcardoso

Found while working on #34270 (PR #34790). The RDF ontology and shapes describe two column-lineage terms differently from what the metadata projection actually writes. ontology_describe serves the ontology to MCP clients and agents, so the mismatch misleads them.

1. om:fromColumn / om:toColumn are declared as IRIs, but the projection writes plain string literals

  • Declared: openmetadata-spec/src/main/resources/rdf/ontology/openmetadata.ttl:1430 and :1438 declare om:fromColumn / om:toColumn as owl:ObjectProperty with range om:Column.
  • Changelog: openmetadata-spec/src/main/resources/rdf/ontology/CHANGELOG.md:20 (1.1.0) says they "are now URI references to om:Column".
  • SHACL: openmetadata-spec/src/main/resources/rdf/shapes/openmetadata-shapes.ttl:106 om:ColumnLineageShape requires IRIs (sh:class om:Column), so every real om:ColumnLineage node is reported as a violation. Validation is report-only.
  • Written: the production writer, RdfRepository.buildLineageModel (openmetadata-service/.../rdf/RdfRepository.java ~1252-1255, run by RdfIndexApp), adds the column FQNs as plain string literals: om:fromColumn "svc.db.schema.table.col". The IRI form only comes from RdfPropertyMapper.addColumnLineage, which fires for entity JSON fields that current schemas lack.

Queries must match the literal (see the column-lineage section of docs/rdf-ontology-contract.md and the sparql_query MCP tool description).

2. om:hasChildColumn is labelled InferenceOnly, but a normal reindex materializes it

Suggested direction

Pick one model and make the ontology, the SHACL shape, the CHANGELOG, the JSON-LD contexts and the writer agree. Then either:

  1. Keep literals: make them datatype properties, fix the range, shape and CHANGELOG; or
  2. Switch to IRIs: project column-to-column links as IRIs, which would let traversal join on resources, and update the query guidance and contract tests.

Also mark om:hasChildColumn as om:Stored. The RdfOntologyContractTest / description-vocabulary tests should then guard the agreed form.

Related: #34270, #34790 (ADR A6 in docs/adr/2026-09-16-agent-sparql-execution.md).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions