OMF 1.2 Writer module
- Last UpdatedJun 26, 2026
- 5 minute read
This module receives messages from upstream modules and processes them by writing OMF 1.2 messages to an OMF endpoint.
Module settings
The following table provides a detailed list of module settings.
|
Name |
Requirements |
Purpose |
Default |
|---|---|---|---|
|
Source Property |
Length: 1-64 |
Optional property that contains the input data the module will use. If not provided, the entire incoming flow message will be used as the source. |
data |
|
Target Property |
Length: 1-64 |
The property to write the results into. |
data |
|
Data Selection (Resource) |
Selection |
The resource file that contains mappings between data in the incoming messages. Valid data types: BOOLEAN, INT64, INT32, INT16, UINT64, UINT32, UINT16, STRING, DATETIME, FLOAT64, FLOAT32 |
|
|
Timestamp Mode |
Dropdown |
Where to read the timestamp from. Options: Current Time (use current time), From Data Item (read from each data item), From Message (read one timestamp from the Timestamp Property). |
CurrentTime |
|
Timestamp Property |
Length: 0-64 |
The property that contains the timestamp to use for the OMF data. Used when Timestamp Mode is From Message. If this property is specified in any other Timestamp Mode, the module will fail to start. This is to avoid accidental misconfiguration. |
|
|
Keep Properties |
true/false |
If true all properties not renamed or removed will be included in the output. False will only include properties renamed or added. |
|
|
Credentials |
Selection |
The credentials to use for authentication. |
Credentials setting details
The Credentials setting is a custom credential designed to handle all OMF endpoints supported by the module. Most fields will be optional at the credential level to handle the different authentication options. The module will be responsible for verifying the fields.
|
Name |
Requirements |
Purpose |
Default |
|---|---|---|---|
|
Endpoint (Required) |
URI |
OMF Endpoint URL to write data to. |
|
|
Username (Optional) |
Length: 1-255 |
Basic authentication username. Required for PI Web API Basic authentication. |
|
|
Password (Optional) |
Length: 1-255 |
Basic authentication password. Required for PI Web API Basic authentication. |
|
|
DisableEndpointCertificateValidation (Optional) |
Boolean |
Allow untrusted certificates if checked. Disabling certificate validation is against AVEVA best practices and only recommended in test environments. |
false |
|
ClientId (Optional) |
String |
OIDC Client ID. Required for any OIDC authentication (PI Web API OIDC, CONNECT Classic, and CONNECT.) |
|
|
ClientSecret (Optional) |
String |
OIDC Client Secret. Required for any OIDC authentication (PI Web API OIDC, CONNECT Classic, and CONNECT.) |
|
|
TokenEndpoint (Optional) |
URI |
Retrieves a token from an alternative endpoint. Optional for Connect OIDC authentication. Required for PI Web API OIDC authentication. |
Code examples
Example: Send a simple, incoming flow message to OMF endpoint
This example shows how the module processes an incoming flow message by transforming and then sending the flow message to an OMF endpoint
Configuration
-
Source Property = data
-
Target Property = data
-
Data Selection (Resource) = "Existing data selection file of type Resource"
-
Credentials = "Existing credentials object of type Credentials"
-
OMF Endpoint = "Valid OMF Endpoint"
-
Incoming message
{
"data": {
"id": "tag1",
"name": "temp1",
"value": 25.853235
}
}
Data Selection Array
[
{
"name": "temp1",
"streamId": "AutoCreatedStream",
"indexProperty": null,
"referenceProperty": "name",
"referenceValue": "temp1",
"dataType": "Float64",
"valueProperty": "value"
}
]
Module output
The module output includes an object that contains the status of the write call for the incoming message. The resulting OMF data message is sent to a predefined OMF endpoint and is not visible in Flow Studio.
{
"crosser": {
"success": true
},
"data": {
"statusCode": "Accepted"
}
}
Example: Wildcard reference value
When the referenceValue is set to "*" (wildcard), the module matches any value found at the referenceProperty key, effectively treating the property name itself as the identifier rather than requiring a specific value to match against.
This approach is useful when the incoming data is a flat set of key-value pairs -- for example, temperature: 25.8 -- rather than objects with a shared identifier field, such as name: temp1.
Configuration
-
Source Property = data
-
Target Property = data
-
Data Selection (Resource) = "Existing data selection file of type Resource"
-
Credentials = "Existing credentials object of type Credentials"
-
OMF Endpoint = "Valid OMF Endpoint"
Incoming message
{
"data": {
"temperature": 25.853235,
"pressure": 1.01325
}
}
Data Selection Array
[
{
"name": "temperature",
"streamId": "TemperatureStream",
"indexProperty": null,
"referenceProperty": "temperature",
"referenceValue": "*",
"dataType": "Float64",
"valueProperty": "temperature"
},
{
"name": "pressure",
"streamId": "PressureStream",
"indexProperty": null,
"referenceProperty": "pressure",
"referenceValue": "*",
"dataType": "Float64",
"valueProperty": "pressure"
}
]
How it works
|
Field |
Meaning in this example |
|---|---|
|
referenceProperty |
The key in the incoming data to look for ("temperature", "pressure"). |
|
referenceValue |
"*" means "match regardless of the value found at that key." |
|
valueProperty |
The key whose value is sent to OMF (same key here, since the value is the reading). |
|
streamId |
The OMF stream the value is written to. |
Contrast with a non-wildcard selection
In the non-wildcard examples, data items contain an identifier field -- for example, "name": "temp1" -- and referenceValue is set to "temp1" to match only items where name == "temp1". The wildcard removes that requirement and is useful when each property in the object already represents a distinct measurement.
Code example: Timestamp Mode: Current Time
The module uses the current system time as the timestamp for all OMF data values. The indexProperty in the Data Selection must be null.
Configuration
-
Source Property = data
-
Target Property = data
-
Timestamp Mode = Current Time
-
Data Selection (Resource) = "Existing data selection file of type Resource"
-
Credentials = "Existing credentials object of type Credentials"
-
OMF Endpoint = "Valid OMF Endpoint"
Incoming message
{
"data": {
"name": "temp1",
"value": 25.853235
}
}
Data Selection Array
[
{
"name": "temp1",
"streamId": "AutoCreatedStream",
"indexProperty": null,
"referenceProperty": "name",
"referenceValue": "temp1",
"dataType": "Float64",
"valueProperty": "value"
}
]
The OMF data message will be sent with the current UTC system time as the timestamp.
Code example: Timestamp Mode: From Data Item
The module reads the timestamp from each individual data item using the indexProperty specified in the data selection.
Configuration
-
Source Property = data
-
Target Property = data
-
Timestamp Mode = From Data Item
-
Data Selection (Resource) = "Existing data selection file of type Resource"
-
Credentials = "Existing credentials object of type Credentials"
-
OMF Endpoint = "Valid OMF Endpoint"
Incoming message
{
"data": {
"name": "temp1",
"value": 25.853235,
"timestamp": "2024-01-15T12:30:00Z"
}
}
Data Selection Array
[
{
"name": "temp1",
"streamId": "AutoCreatedStream",
"indexProperty": "timestamp",
"referenceProperty": "name",
"referenceValue": "temp1",
"dataType": "Float64",
"valueProperty": "value"
}
]
The OMF data message will use the timestamp value from each data item (2024-01-15T12:30:00Z in this case).
Code example: Timestamp Mode: From Message
The module reads a single timestamp from a top-level property on the incoming flow message specified by the Timestamp Property setting. The indexProperty in the Data Selection must be null.
Configuration
-
Source Property = data
-
Target Property = data
-
Timestamp Mode = From Message
-
Timestamp Property = timestamp
-
Data Selection (Resource) = "Existing data selection file of type Resource"
-
Credentials = "Existing credentials object of type Credentials"
-
OMF Endpoint = "Valid OMF Endpoint"
Incoming message
{
"timestamp": "2024-01-15T12:30:00Z",
"data": {
"name": "temp1",
"value": 25.853235
}
}
Data Selection Array
[
{
"name": "temp1",
"streamId": "AutoCreatedStream",
"indexProperty": null,
"referenceProperty": "name",
"referenceValue": "temp1",
"dataType": "Float64",
"valueProperty": "value"
}
]
The OMF data message uses the timestamp property from the message (2024-01-15T12:30:00Z) as the timestamp for all data values.