Complete OMF schema example
- Last UpdatedAug 19, 2026
- 2 minute read
The following example demonstrates a complete OMF schema message that defines the types, containers, and relationships required for a simple tank monitoring system.
The schema includes entity, event, and streaming data types, an enumeration, a measurement container, and a schema-level relationship that associates tanks with high-pressure alarm events. Together, these components illustrate how multiple schema elements can be combined to model an industrial asset and its related operational data.
omfversion: 2.0
messagetype: schema
action: create
messageformat: json
{
"types": [
{
"id": "Tank",
"type": "object",
"classification": "entity",
"properties": {
"SerialNumber": {
"type": "string"
},
"Model": {
"type": "string"
},
"Capacity": {
"type": "number",
"format": "float64",
"uom": "m³"
}
}
},
{
"id": "HighPressureAlarm",
"type": "object",
"classification": "event",
"properties": {
"Severity": {
"type": "integer",
"format": "int32"
},
"Message": {
"type": "string"
},
"MaximumPressure": {
"type": "number",
"format": "float64",
"uom": "kPa"
}
}
},
{
"id": "ValveState",
"enum": {
"type": "integer",
"format": "int32",
"values": [
{
"name": "Closed",
"value": 0
},
{
"name": "Open",
"value": 1
},
{
"name": "Transitioning",
"value": 2
}
]
}
},
{
"id": "TankMeasurements",
"type": "object",
"classification": "streamingdata",
"properties": {
"Timestamp": {
"type": "string",
"format": "date-time",
"isindex": true
},
"Pressure": {
"type": "number",
"format": "float64",
"uom": "kPa",
"interpolation": "continuous"
},
"Temperature": {
"type": "number",
"format": "float64",
"uom": "degC",
"interpolation": "continuous"
},
"ValveState": {
"reftypeid": "ValveState",
"interpolation": "stepwisecontinuousleading"
}
}
}
],
"containers": [
{
"id": "Tank-101.Measurements",
"typeid": "TankMeasurements",
"name": "Tank 101 measurements",
"description": "Pressure and temperature measurements for Tank 101",
"datasource": "Plant-A-OPC-UA",
"tags": [
"Plant-A",
"Tank-101"
],
"metadata": {
"area": "Storage",
"sourceProtocol": "OPC UA"
}
}
],
"relationships": [
{
"source": {
"collection": "types",
"id": "Tank",
"type": "Related",
"label": "hasEvent"
},
"target": {
"collection": "types",
"id": "HighPressureAlarm"
}
}
]
}
omfversion: 2.0
messagetype: instance
action: create
messageformat: json
{
"entities": [
{
"typeid": "Tank",
"id": "Tank-101",
"name": "Tank 101",
"description": "Primary finished-product storage tank",
"datasource": "Plant-A-Asset-System",
"tags": [
"Plant-A",
"Storage"
],
"metadata": {
"area": "Storage",
"criticality": "High"
},
"value": {
"SerialNumber": "TK-101-2026",
"Model": "ST-5000",
"Capacity": 5000.0
}
}
],
"events": [
{
"typeid": "HighPressureAlarm",
"id": "Alarm-Tank-101-20260717-001",
"name": "High pressure in Tank 101",
"description": "Tank pressure exceeded the configured operating limit",
"starttime": "2026-07-27T08:03:39.3157748Z",
"endtime": null,
"datasource": "Plant-A-Alarm-System",
"tags": [
"Pressure",
"Active"
],
"value": {
"Severity": 2,
"Message": "Pressure exceeded 450 kPa",
"MaximumPressure": 463.8
}
}
],
"streamingdata": [
{
"id": "Tank-101.Measurements",
"values": [
{
"Timestamp": "2026-07-17T22:29:00Z",
"Pressure": 442.1,
"Temperature": 27.4,
"ValveState": 0
},
{
"Timestamp": "2026-07-17T22:30:00Z",
"Pressure": 463.8,
"Temperature": 27.6,
"ValveState": 1
}
]
}
],
"relationships": [
{
"source": {
"collection": "entities",
"id": "Tank-101"
},
"target": {
"collection": "streamingdata",
"id": "Tank-101.Measurements"
}
},
{
"source": {
"collection": "events",
"id": "Alarm-Tank-101-20260717-001"
},
"target": {
"collection": "entities",
"id": "Tank-101"
}
}
]
}