Number of input and output field
| Number of input field |
: |
One |
| Number of output field |
: |
One |
This transformation function is used to retrieve a reference where the length of the reference key is not fixed.
The parameters of this transformation function are:
- File Reference
The name of the reference file, including its path.
- Field Splitter
The delimiter used to split fields in the reference file. If not specified, the default delimiter is a comma (,).
- Index of Ref. Field
The index of the field in the reference file that will be used as the reference key. The default value is 0 if not specified.
- Index of Output Field
The index (or indices) of the field(s) in the reference file that will be returned as output. Multiple indexes should be separated by a hyphen (-).
- Lookup Order
The order in which the lookup is performed. 0 means lookup from the longest to the shortest reference field; 1 means lookup from the shortest to the longest reference field. The default value is 0.
For example, the contents of the reference file data.txt are as follows :
ab|data1
abc|data2
ac|data3
If the parameter values are as follows:
- File Reference : data.txt
- Field Splitter : |
- Index of Ref. Field : 0
- Index of Output Field : 1
- Lookup Order : from the longest to the shortest one
A stream with input '
abc123' will get the output '
data2'
A stream with input '
abc' will also get the output '
data2'
If the parameter values are as follows:
- File Reference : data.txt
- Field Splitter : |
- Index of Ref. Field : 0
- Index of Output Field : 1
- Lookup Order : from the shortest to the longest one
A stream with input '
abc123' will get the output '
data1'
A stream with input '
abc' will get also the output '
data1'