MATIH Platform is in active MVP development. Documentation reflects current implementation status.
11. Pipelines & Data Engineering
Ontology Service
Schema Validation

Schema Validation

Schema validation ensures that ontology definitions are consistent, complete, and aligned with physical data sources. The validation engine checks object type integrity, relationship consistency, mapping correctness, and governance compliance.


Validation Rules

Object Type Validation

RuleDescriptionSeverity
Unique namesNo duplicate object type names within a tenantError
Required propertiesAt least one property must be definedError
Valid data typesAll property data types must be recognizedError
Description requiredDescription must be non-emptyWarning
Governance requiredOwner and classification must be setWarning

Relationship Validation

RuleDescriptionSeverity
Target existsTarget object type must existError
No circular referencesDetect circular relationship chainsError
Inverse consistencyInverse relationship must reference back correctlyWarning
Cardinality matchBoth sides of the relationship agree on cardinalityError

Mapping Validation

RuleDescriptionSeverity
Source existsPhysical table or endpoint must be accessibleError
Column existsAll mapped source columns must existError
Type compatibilitySource column types must be compatible with property typesWarning
CoverageAll required properties must have mappingsWarning

Validation API

POST /v1/ontology/validate

Request:
{
  "objectTypeId": "ot-abc-123",
  "checks": ["object_type", "relationships", "mappings", "governance"]
}

Response:
{
  "valid": false,
  "errors": [
    {
      "check": "relationships",
      "rule": "target_exists",
      "message": "Target object type 'OrderItem' not found",
      "path": "relationships[0].target_type"
    }
  ],
  "warnings": [
    {
      "check": "mappings",
      "rule": "coverage",
      "message": "Property 'phone_number' has no datasource mapping",
      "path": "properties[3]"
    }
  ]
}

Bulk Validation

Validate all object types in a tenant ontology:

POST /v1/ontology/validate/all

Response:
{
  "totalObjectTypes": 25,
  "valid": 22,
  "invalid": 3,
  "results": [...]
}

Pre-Deployment Validation

Before deploying ontology changes to production, the validation engine runs a comprehensive check:

PhaseChecks
SyntaxValid JSON/YAML, required fields present
SemanticRelationship consistency, type compatibility
PhysicalDatasource accessibility, column existence
GovernanceOwner set, PII fields classified, retention configured

Migration Validation

When updating an existing ontology, the validator checks for breaking changes:

Change TypeValidation
Property removedCheck if any downstream consumers reference it
Type changedCheck backward compatibility
Relationship removedCheck if any queries depend on it
Property renamedCheck all datasource mappings

Related Pages