Skip to main content

DataMapping@1

Node DataMapping@1 is used to map data from one field to another field or value based on configuration in the payload.

Adapter Prerequisites

Node Configuration

For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.

transformations:
- type: DataMapping@1
path: $.AlarmState # The path to the source field
targetPath: $.State # The path to the target field
targetValueWriteMode: Overwrite # The target value write mode, should be 'Overwrite' to overwrite the target value
sourceValueType: Int # The data type of the source field. Allowed values are: 'Int', 'String', 'Binary', 'Boolean', 'DateTime', 'Double', 'StringArray', 'IntArray', 'TimeSpan', 'Int64'
targetValueType: Int # The data type of the source field. Allowed values are: 'Int', 'String', 'Binary', 'Boolean', 'DateTime', 'Double', 'StringArray', 'IntArray', 'TimeSpan', 'Int64'
mappings: # The mappings that should be applied to the source field
- sourceValue: 0 # The source value that should be mapped
targetValue: 1 # The target value that should be written
description: "received -> normal" # A optional description of the mapping. will be added to the debug logs for better traceability
- sourceValue: 1
targetValue: 3
description: "acknowledged -> acknowledged"