Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

New Contributor

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

Accepted Solutions

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

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.

2 REPLIES 2

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

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.

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

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.