- I have designed a workbench in which i will pass an input field to StringLengthCalculator transformer and the result is stored in a default attribute (_length).
- Then, i have passed this (_length attribute) to ExpressionEvaluator transformer to calculate values based on this formula (13 - @value(_length))+ @value(_length) and the resultant value is stored in default attribute (_result)
- This _result attribute is mapped to pad width parameter of StringPadder transformer and a particular field is selected in it which needs to be updated in target.
- I can see the trailing spaces on the target field to the left.
But, my main challenge is how to perform this flow on all fields because we cannot give uniform pad width to all fields and pad width shoulddepend on the stringlength of different field values in source table and all the target fields should have different number of trailing spaces based on their source string value.
Kindly provide me some idea ? :)