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 based on the best matching references.
The parameters of this transformation function are :
- File Reference
The name of the reference file
- Field Splitter
The delimiter used to split each row of the reference file into fields. The default delimiter is a comma (,).
- Indexes of Ref. Field
The indices of the reference fields. Multiple values are separated by a hyphen (-).
- Indexes of Main Refs
Specifies the main reference fields. Multiple values are separated by a hyphen (-). These fields are used for the initial lookup.
- Index Of Output Field
The index of the field whose value will be returned as the output.
The lookup process works as follows:
- The Indexes of Main References are used for the first lookup.
- Subsequent lookups are performed using the remaining Indexes of Reference Fields.
- If multiple matching values are found, the value with the highest number of matched reference fields is selected as the output.
Example:
File reference ref.txt with the following content:
54|SMS events||||SMS Remote Area|
54|OSMSAC||SMS MO|SMS CDMA & Analog||
54|OSMSAC||SMS MO||SMS CDMA & Analog|
54|OSMSFX||SMS MO||SMS FIXED|
54|OSMSFX||SMS MO|SMS FIXED||
54|OSMSIM||SMS MO||SMS IM3|
54|OSMSIM||SMS MO|SMS IM3||
54|OSMSLN||SMS MO||SMS IDD|
54|OSMSLN||||Promo SMS IDD|
54|OSMSLN||||SMS IDD|
54|OSMSLN||SMS MO|SMS IDD||
54|OSMSLN||||Promo SMS IDD|
54|OSMSMC||SMS MO||SMS ISAT|
54|OSMSMC||SMS MO|SMS ISAT||
54|OSMSNA||SMS MO|SMS Natrindo||
54|OSMSNA||SMS MO||SMS Natrindo|
54|OSMSPS||SMS MO||SMS Primasel|
54|OSMSPS||SMS MO||SMS Primasel|
54|OSMSSC||SMS MO||SMS Short Code|
54|OSMSSC||SMS MO|SMS Short Code||
54|OSMSTL||SMS MO|SMS Telkomsel||
54|OSMSTL||SMS MO||SMS Telkomsel|
54|OSMSXL||SMS MO||SMS Excelcom|
54|OSMSXL||SMS MO|SMS Excelcom||
The stream input data is as follows:
54|A|SMS MO|SMS Excelcom|SMS Excelcom|
54|B|SMS MO|SMS Telkomsel|SMS Telkomsel|
54|C|SMS MO||SMS ISAT|
The ReferencePriority function with the following parameters:
The output (REV_CODE) of this transformation function are:
OSMSXL
OSMSTL
OSMSMC