You have to “implement” these two functions inside Normalizer component (assuming you will use CTL):
function count() {
return 3;
}
Function count() is called once for each input row/record. Its task is to tell component how many times it should call “transform()” function on input row. Each time, counter (counting from 0…) is passed into “transform()” and it has to produce one output record.
function transform(idx) {
$0.name_first:=$0.name_first;
$0.name_last:=$0.name_last;
switch (idx) {
case 0: $0.data=$0.data1;
case 1: $0.data=$0.data2;
case 2: $0.data=$0.data3;
}
}
I assume that output metadata of Normalizer contains 3 fields (first_name,last_name,data).