Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi - Is it possible to send flowfile from one nifi processor to another processor without disk write ?

avatar
Rising Star

Nifi -- Without writing to disk , is it possible to send flowfile from one peocessor to another ? Ex: i have 3 processors in order- splitjson , evaluatejsonpath , updateattribute processors .

I would like to process only these 3 processors in-memory (from the output of splitjson to update attribute o/p). if it is possible only selected processors in-memory . let us know the process ??

1 ACCEPTED SOLUTION

avatar
Master Guru

As @Bryan Bende has said, it isn't possible with those processors and/or the framework. However, you could emulate this part of the flow with something like ExecuteScript, but you'd be responsible for all the work (reading in the JSON, splitting it, getting the fields out into attributes). Groovy for example has a JsonSlurper which reads in the JSON to an object, at that point you could access the array (using object notation not JSON path), call each(), then further access the members (again using object notation) and set flow file attributes accordingly.

View solution in original post

2 REPLIES 2

avatar
Master Guru

There is currently no way to do this. The idea of chaining together a series of processors and having them operate as if they were one processor has been discussed before, and there are some concepts in the framework that could possibly help support this in the future, but currently it does not exist.

avatar
Master Guru

As @Bryan Bende has said, it isn't possible with those processors and/or the framework. However, you could emulate this part of the flow with something like ExecuteScript, but you'd be responsible for all the work (reading in the JSON, splitting it, getting the fields out into attributes). Groovy for example has a JsonSlurper which reads in the JSON to an object, at that point you could access the array (using object notation not JSON path), call each(), then further access the members (again using object notation) and set flow file attributes accordingly.