I am developing hierarchical map for EDI to Text -
Few of the output fields expect right aligned output as shown below. you can see 325.610, 35.470 etc are right aligned in the output.
Can you please let me know how to right align them ?
NP25 325.610 TIM USD
NP25 353.470 TIM USD
NP25 244.340 TIM USD
NP25 32.730 TIM USD
Suppose you're expecting 4 digits for the left side and 3 for the right side, you can use the following code in a tJavaRow component:
DecimalFormat df1 = new DecimalFormat("###0.000"); output_row.price = df1.format(input_row.price);
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Read about some useful Context Variable ideas