Support Questions

Find answers, ask questions, and share your expertise

Apache Nifi - How to quickly serialize a Json on Apache Nifi 1.7.1


Please, I need to serialize a text / plain into a json quickly because of the amount of records I have in my workflow, I tried to use the one executescript / jython processor, however, it got very slow due to the json.dumps () class. Please, what is the most performatic way in Nifi to serialize Json? Can you send an example?

Thank you!

New Contributor
  1. You have to set the attribute "mime.type" to "application/json" with for example the UpdateAttribute-Processor. [Image]
  2. You have to use EvaluateJSONPath-Processor to format it correct. [Image]
  3. You have to configure the EvaluateJSONPath-Processor and add it a attribute. The name is of the attribute doesnt care. As value you set "$". So it will use the whole Flowfile and will format it correctly. [Image]