Object Types
Object types are the core building blocks of the MATIH ontology. Each object type represents a domain entity (such as Customer, Order, or Product) and defines its properties, relationships, governance metadata, and materialization strategy.
Source: data-plane/ontology-service/src/models/object_type.py
Object Type Model
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
name | string | Object type name (e.g., Customer) |
description | string | Human-readable description |
layer | OntologyLayer | Ontology layer (raw, staging, curated, semantic) |
status | ObjectTypeStatus | Lifecycle status (draft, active, deprecated) |
governance | GovernanceInfo | Ownership, classification, PII fields, retention |
properties | list of PropertyDefinition | Typed property definitions |
relationships | list of RelationshipDefinition | Links to other object types |
materialization | MaterializationStrategy | How the object is physically stored |
Ontology Layers
| Layer | Purpose | Example |
|---|---|---|
raw | Unprocessed source data | Raw CSV imports, API responses |
staging | Cleaned and validated data | Deduplicated, type-cast records |
curated | Business-ready data | Enriched, joined datasets |
semantic | Domain model entities | Customer 360, Product catalog |
Property Definition
Each property has a data type, source mapping, validation rules, and governance metadata:
| Field | Type | Description |
|---|---|---|
name | string | Property name |
data_type | DataType | Data type (string, integer, double, boolean, date, timestamp, json) |
description | string | Human-readable description |
required | bool | Whether the property is mandatory |
validation | PropertyValidation | Min/max, regex pattern, enum values |
source | PropertySource | Source type (direct, derived, aggregated, computed) |
governance | GovernanceInfo | Classification, PII flag |
Property Validation
{
"name": "email",
"data_type": "string",
"required": true,
"validation": {
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"min_length": 5,
"max_length": 255
}
}Governance Metadata
| Field | Type | Description |
|---|---|---|
owner | string | Team or user ID owning this object type |
steward | string | Data steward responsible for quality |
classification | Classification | PUBLIC, INTERNAL, CONFIDENTIAL, RESTRICTED |
pii_fields | list of string | Fields containing personally identifiable information |
retention_days | int | Data retention period (default: 365) |
Relationships
| Field | Type | Description |
|---|---|---|
name | string | Relationship name (e.g., placed_orders) |
target_type | string | Target object type name |
cardinality | Cardinality | ONE_TO_ONE, ONE_TO_MANY, MANY_TO_MANY |
join_type | JoinType | INNER, LEFT, RIGHT, FULL |
inverse_name | string | Name of the inverse relationship |
API Endpoints
POST /v1/ontology/object-types -- Create object type
GET /v1/ontology/object-types -- List object types
GET /v1/ontology/object-types/:id -- Get by ID
PUT /v1/ontology/object-types/:id -- Update object type
DELETE /v1/ontology/object-types/:id -- Delete object typeRelated Pages
- Datasource Mapping -- Map to physical schemas
- Schema Validation -- Validate object types
- GraphQL API -- Query object types via GraphQL