Schema messages
- Last UpdatedJul 29, 2026
- 2 minute read
Schema messages define the structural model of data. They describe types, containers, and type-level relationships independently of any instance data. Schema messages are declarative - describing structure, not data values. They declare what kinds of objects exist and how they relate to each other before any entities, events, or streaming values are sent.
A schema message is expressed as a single JSON object containing one or more typed arrays, where each array groups objects of the same conceptual role. You can use a schema message to:
-
Define types (such as entity, event, or streaming data classifications)
-
Identify and define containers to reference the types
-
Define the relationship between the types
-
Publish or update a complete structural model prior to sending data
Note: Schema messages may be sent independently or alongside instance messages, but they do not contain entities, events, or streaming values themselves.
Schema message structure
A schema message contains the following top-level arrays:
|
Array name |
Description |
|---|---|
|
types |
Defines type schemas, including properties, classifications, inheritance, and metadata. |
|
containers |
Defines containers that reference types and describe how data is stored or streamed |
|
relationships |
Defines relationships between OMF schema-level object types. At the schema level, relationships describe how object types are associated, such as entityType-to-entityType, eventType-to-entityType, or streamingData Type-to-entity. These relationships define the structure and expected associations between types; they do not apply to individual data instances. |
Each array is optional, but when you use an array, it must only contain objects of that specific kind. The array name explicitly defines how the contained objects are interpreted.
Schema message example
{
"Containers": [
{
"typeid": "typeid",
"id": "streamid",
"name": "name",
"datasource": "datasourceId",
"tags": [
"tag1",
"tags2"
],
"metadata": {
"id": "value"
},
"propertyoverrides": {
"propertyid": {
"minimum": 0
}
}
}
],
"types": [
{
"id": "typeid",
"version": "typeversion",
"classification": "streamingdata/event/entity",
"basetypeid": "basetypeid",
"extrapolation": "all",
"properties": {
"PlantId": {
"type": "string",
"isindex": true
},
"PlantName": {
"type": "string"
},
"Address": {
"type": "string"
},
"Contact": {
"type": "string"
}
}
}
],
"relationships": [
{
"source": {
"collection": "types", // types, streamingdata
"id": "typeid",
"property": "Temperature"
},
"target": {
"collection": "types", // types, streamingdata
"id": "containerTypeId"
}
}
]
}