Table Of Contents
- General description
- The different parts of the Value Mapper
- Guide
- Video guide
General description
The Value Mapper can be used to transform values in the data. For example, it can remove characters that are not allowed in another webservice. This also makes a data cleanup possible to create a consistency in data by casting to a specific casing.
The different parts of the Value Mapper
- Accessor (required field)
This defines where the Transformer can find the data it needs to modify. Several strategies can be used, such as, defining a key or path as a location in the data structure where information can be found. The located data will be used in the Mapper.- Children Accessor
This works as a wrapper to group multiple accessors. - Key Accessor
Filters to apply a Mapper to one or more keys.- Root: The starting path of the lookup.
- Keys: The names of the keys that need to be filtered.
- Pattern accessor
Search for keys with a JMESPath pattern.- Pattern: The search pattern for finding keys.
- Keys: The names of the keys that need to be filtered.
- Structure accessor
- Key: This defines the path to the key(s).
- Value: This defines the path to the value.
- Root: This specifies the starting path of the lookup.
- Children Accessor
- Mappers
The Mapper is the part of the Transformer that describes what to do with the data found by the accessor. A wide variety of Mappers is offered to cast or convert data to a certain data type or to filter specific characters. Multiple Mappers can be defined and will be applied in the order of definition.
Guide
Here’s how you can implement the transformer.
Step 1: Click on Add Data Transformer and select Value Mapper transformer.
Step 2: Select the Accessor. For example, Key Accessor.
Step 3: Specify the Keys you wish to map and transform.
Step 4: Next, select a Mapper (the data type you want the key to be transformed into). For example, you can select Cast: Float.
Step 5: Click on the Run Test button. You will observe that the transformer has transformed the data (into float in this case).