The Mapper component is used to map source data to target data.
The Mapper component differs from other components; it is not a discrete component that can be selected and used in a flow. From a usability perspective, the Mapper component provides functionality that is leveraged through the configuration of other components.
The expression language is an essential part of the functionality of the integration platform. It is frequently required for syntactic and semantic data transformation. Mapper uses JSONata expressions to do complex data transformation. JSONata has many advantages for the use-case:
Native JSON support for input but also output. Every valid JSON document is, by default, a JSONata expression.
A set of built-in functions to perform the content transformation, for example, type transformation (string to number), string transformation (splitting, joining), and even higher-level functions (lambda, map, reduce).
Comprehensive selector mechanism allowing you to navigate nested JSON structures, arrays, predicated-based selectors
Ability to add custom functions, for example, date parsing or output functions.
Visit the JSONata website for more information.
The following rules are defined to apply JSONata expressions to the integration platform context generically:
An expression is applied to each incoming message one by one. Possible runtime errors during the evaluation are reported as errors to the platform. One input message provides one message at the output of the component.
Root context is the message body. It contains actual data from the previous step and, possibly, passthrough data.
This component has no trigger functions. It is not accessible to select as a first component during the integration flow design.