Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Turn off json values rounding in NiFi

avatar
New Contributor

Hello,

 

I have NiFi flow with EvaluateJsonPath that read a content of FlowFile with json to Data attribute. But numeric values of json are changed, i.e.:

GenerateFlowFile
{
"Amount1": 999999999999999999.99,
"Amount2": 999999999.99
}

->
EvaluateJsonPath
Data $
->
Data
{"Amount1":1.0E18,"Amount2":9.9999999999E8}

How do I stop NiFi from rounding off and changing json numbers? Tested on NiFi 1.15/1.19.

Thanks.

1 REPLY 1

avatar
Super Collaborator

I don't see EvaluateJsonPath give options so it might be something you'd have to handle on your own...personally I'd do it via a Groovy scripted processor for greater control and performance.