I am relatively new to NiFi. I need to flatten a nested json data which I am receiving through GetHTTP processor. Because I want a customized flatten json, I am using an external java code for the same. I am taking help of ExecuteScript processor in order to execute java program. My question is how to pass flow file as an input to that java program. I am able to read the nested json using session and get() in groovy in ExecuteScript but I want to pass that as an input to java program. Any kind of help is appreciated.
No need for external Java program. You can just write a script(ecmascript or any other) in ExecuteScript processor to flatten your incoming JSON. At which point you can relay the updated flowfile to next processor.