I have some input file where fields are set like this
Evaluation(String) GOOD / NEUTRAL / BAD
In output I want to display
0 if good
5 if neutral
9 if bad
which transformation can help on that? where can I read more about this? is there any documentation with samples?
thanks.
Evaluation(String) GOOD / NEUTRAL / BAD
In output I want to display
0 if good
5 if neutral
9 if bad
which transformation can help on that? where can I read more about this? is there any documentation with samples?
thanks.
-
Hello,
For your scenario, it is best to use the Reformat component. In the Reformat transformation you can transform your input strings to the desired numbers.
Example of switch statement in the transformation expression:switch($in.0.stringField) {
case "GOOD": $out.0.intField=0;
break;
case "NEUTRAL": $out.0.intField=5;
break;
case "BAD": $out.0.intField=9;
break;
}
For more samples, you can see the Quick Start Guide - http://www.cloveretl.com/documentation/quickstart/
Documentation you can find here: http://doc.cloveretl.com/documentation/ ... index.html
_________________
Jiri Novak
CloverCARE Support
Javlin, a.s.
Please sign in to leave a comment.
Comments 1