Function Name |
Lookup | ||
Category |
Misc | ||
Icon |
![]() |
||
Description |
Maps one set of values to another | ||
Inputs |
|
||
Outputs |
|
||
Properties |
|
The lookup component replaces one value with another, so for example you may need to change ISO 2 letter country codes into ISO 3 letter country codes, or Currency names into currency characters etc.
The Lookup components properties (right click on the lookup component and select the 'properties' menu item), allow the key to value mappings to be configured.
Values can be added individually via the Add button or the entire mapping can be edited via the Import button (allows editing as a CSV formatted list).
The only other options effect how the lookup behaves when an attempt is made to map a value that is not present in the keys. There are 3 options.
The value returned for an input value that has no corresponding key value will be the input value itself.
The value returned for an input value that has no corresponding key value will be a default value specified by in the field below.
If an input value has no corresponding key value, then a runtime error is raised and the transform stops.
The Key Value must be unique, and error will be raised if duplicates exist.
The following examples assume the following mapping data values have been set up
Key | Value |
---|---|
US | USA |
GB | GBR |
FR | FRA |
DE | DEU |
If Mapping Failures is set to 'Use Key (input) Value'.
Value | Result |
---|---|
US | USA |
AU | AU |
FR | FRA |
If Mapping Failures is set to 'Use Default' and the default value is set to '???'
Value | Result |
---|---|
US | USA |
AU | ??? |
FR | FRA |
If Mapping Failures is set to 'Raise Error'
Value | Result |
---|---|
US | USA |
AU | Runtime Error |