I agree with James that this is a very valid methodology. If you have flowfiles with multiple JSON records, you could also use a PartitionRecord processor to collect “non-laurens” records to one relationship, and “laurens” records to another.
Andy LoPresto [email protected] [email protected] PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On Apr 24, 2018, at 1:31 AM, James Wing <[email protected]> wrote: > > Your solution sounds very normal and appropriate to me. Is it performing > slowly or causing you problems? > > Thanks, > > James > > On Mon, Apr 23, 2018 at 2:37 PM, Laurens Vets <[email protected] > <mailto:[email protected]>> wrote: > Hello list, > > I'm using NiFi to ship JSON formatted data around. However, I want NiFi to > drop certain data when some field matches. Let's say we have a field called > 'username' and we don't want to further process any data which contains > "username":"laurens". > > What I currently do is get the field 'username' out of the JSON and add it to > the flowfile attribute and then drop when the flowfile matches. I use > RouteOnAttribute for this and automatically terminate the relationship when > it matches. > > Is there a better/faster way? Thanks in advance! >
signature.asc
Description: Message signed with OpenPGP using GPGMail
