Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the source column as Product_Amount as Float Datatype (Eg: 23.6161)
I am expecting this should load only the 2 decimal values (Eg: 23.61).
In Var
******
(int)(Float.parseFloat(row4.Product_Amount)*100) - Datatype is Int
Here I need to cut off the amount and need to multiply by 100 to convert to integer.
In output table
****************
Float.parseFloat(String.valueOf(Var.var9))/100 - Type is Float
While running the program I got the error as attached.
Note: But the same logics is worked while convert from String to Double.
Can anyone assist is there any issue in my logics?
Hello,
Did you try to add the precision part of your float column to 2? If your use case is trying to deal with a floating point error, using a BigDecimal instead of a float will better.
I have tried with state but am getting the same error , even I have changed to Precision "2"
In Var
******
(int)(Float.parseFloat(row4.Product_Amount)*100) - Datatype is Int
In output table
****************
Float.parseFloat(String.valueOf(Var.var9))/100 - Type is Float and Precision as "2".
Even I have tried with BigDecimal as well.
Hi,
Is anyone can assist this issue.