Laurens,

The recommended model in terms of capability/performance/flexibility
would be to use the Record Readers/Writers and associated processors
as Andy was hinting at.  The approach you took was the simplest and
will perform fine up to say a few thousands per second.  If you need
faster then the record processors will be the way to play it.

They are a bit more involved as you'd need to supply a schema for the
data but then you can use things like RouteRecord to use a SQL
statement to route records you want/dont want based on field values.
Cool stuff.

Thanks

On Tue, Apr 24, 2018 at 11:24 AM, Laurens Vets <[email protected]> wrote:
> Good to know! No, there's no slowness or problems, the solution seemed a bit
> weird to me, that's all :)
>
> On 2018-04-23 22:31, James Wing 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]> 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!

Reply via email to