
Questions: 23,767 //
Answers: 52,373 //
Contributing Members: 18,029
I need to round off the value to (18,15). so I have used payload.xxxx as :string{format:"#################.###############"} as :number)
But it is not getting rounded off, same value comes after transformation
Dataweave cannot handle (18,15) rounding off due to memory? Is there any workaround?
Note : rounding off to (6,3) in a same way works fine
Thanks, Deepak
Nov 16, 2017 at 09:05 AM, phulme answered with:
There seems to have been a change to prevent loss of precision in dataweave. This may have broken format like this. (see comments on a similar question here https://forums.mulesoft.com/questions/41571/format-decimal-number-in-dataweave.html )
A bit of a hack workaround would be (floor (payload.xxxx * 1000000000000000))/1000000000000000
comma separated string to json - Dataweave 1 Answer
SOAP to Java object transformation in Mule 4.1 2 Answers
Signed vs Unsigned numeric in dataweave 0 Answers
extract JSON key value in dataweave 10 Answers