Map with default¤
This transformer requires a map of values, when created. This can be a map such as "A:1,B:2,C:3"
, representing the mapping between the first three letters and the corresponding numbers (i.e. A
to 1
, B
to 2
and C
to 3
).
The transformer requires two input value sequences, when called: the first sequence of values are the values to map, and the second is a sequence of default values.
With these parameterization and applied value sequences, the transformer then works in the following way: * The map of values (specified when the transformer is created) is used for obtaining values from the transformer. * The values to map (specified when the transformer is called) is used for mapping values by the transformer. * The default values (specified when the transformer is called, as a mandatory second argument) is used as a backup sequence of values, in case the (first) value to map is not found within the map of values. It is simply a default.
Normally, the sequence of default values is expected to have the same size as the values to map (i.e. the two sequences provided when calling the transformer are supposed to be compatible). Additionally, in order to provide a certain amount of flexibility: Should that not be the case, if there are less default values than values to map, the last default value is replicated to match the count. This fallback shouldn’t be relied upon, since it may result in a somewhat confusing or unexpected behavior.
Parameter¤
Map¤
A map of values
- ID:
map
- Datatype:
stringmap
- Default Value:
None
Advanced Parameter¤
None