问题
Hi i'am having a input Big Decimal(15,12) value in source in output i am expecting that as string. For example, my source file with value 0.000000000000 by using tmap to convert it into string. "String.valueOf(column name)" for this im getting output is 0E-12. expected output is 0.0000000000 can anyone provide the solution?
回答1:
If you're not applying any transformations to your BigDecimal
column, you can just read it as a String
from your file.
If you must read it as a BigDecimal
and then format it to string, you can do this in your tMap
:
new DecimalFormat("#0.000000000000").format(columnName)
来源:https://stackoverflow.com/questions/48692263/converting-big-decimal15-12-to-string