メイン コンテンツにスキップする

Data formats

The Cognite MQTT extractor supports several formats for the message payloads, such as:

  • Rockwell FactoryTalk DataMosaik
  • Simple values as text
  • Cognite message formats
  • Custom user-created formats

Simple values as text

Some source systems publish messages that are sensor readings as text, and the topic describes which sensor recorded the value. In this case, the extractor will use the topic as the external ID of the time series (with an optional configurable prefix) and use the current time as the timestamp for the datapoint.

Example message

32.5

The Cognite message format

The Cognite message format is a standard for transmitting data to be ingested into CDF over messaging protocols, such as MQTT. Messages must be sent as UTF8-encoded JSON. The format aims to be similar to the API.

Example message

{
"timeseriesData": [
{
"externalId": "my-timeseries",
"items": [
{
"timestamp": 1676550645000,
"value": 1.6
},
{
"timestamp": 1676550663020,
"value": 5.6
},
{
"timestamp": 1676550675900,
"value": 2.4
},
{
"timestamp": 1676550712100,
"value": 3.1
}
]
},
{
"externalId": "my-other-timeseries",
"items": [
{
"timestamp": 1676550645000,
"value": "on"
},
{
"timestamp": 1676550663020,
"value": "off"
}
]
}
]
}