You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by James McMahon <js...@gmail.com> on 2017/09/07 14:11:45 UTC

How to get RouteOnContent to work

I'm trying to do something very simple: my flowfile is a series of keys and
values in json. I'd like to look at the flowfile content and tell me if the
string requiresFile is in there. RouteOnContent seems like just the
processor I need, but I cannot get it to work. Here is what I set in its
config:

content must contain match
UTF-8
1 MB
and I create my own dynamic property
hasFile  requiresFile

I've also tried 'requiresFile', '.*requiresFile.*', .*requiresFile.* -
can't get it to work. Have looked at the documentation, where no examples
are shown at all. I've googled to find out, and noticed that others have
asked. But I never seem to find an answer.

How should I enter the regex pattern to check my flowfile content for this
simple single string in the contents?

Thanks in advance. -Jim

Re: How to get RouteOnContent to work

Posted by James McMahon <js...@gmail.com>.
Thank you Mayank. I went back after seeing your example that works, and was
able to get mine to work. Want to avoid going into details because I was
making a careless mistake. Once I saw your successful example, I knew
immediately what I had mangled. Thanks again for taking the time to reply.
-Jim

On Thu, Sep 7, 2017 at 10:33 AM, mayank rathi <ma...@gmail.com>
wrote:

> Hello James,
>
> I am using RouteOnContent with following properties and it's working fine
> for me:
>
> Match Requirement: content must contain match
> Character Set: UTF-8
> Content Buffer Size: 1 MB
> ExpectedEvent: BILLING|PAYMNT|PAYADJ|CALLADJ
>
> Basically I am looking for records that contain any of the following
> strings:
>
> BILLING
> PAYMNT
> PAYADJ
> CALLADJ
>
> Try requiresFile ( without quotes)
>
> Thanks!!
>
>
>
>
> On Thu, Sep 7, 2017 at 10:11 AM, James McMahon <js...@gmail.com>
> wrote:
>
>> I'm trying to do something very simple: my flowfile is a series of keys
>> and values in json. I'd like to look at the flowfile content and tell me if
>> the string requiresFile is in there. RouteOnContent seems like just the
>> processor I need, but I cannot get it to work. Here is what I set in its
>> config:
>>
>> content must contain match
>> UTF-8
>> 1 MB
>> and I create my own dynamic property
>> hasFile  requiresFile
>>
>> I've also tried 'requiresFile', '.*requiresFile.*', .*requiresFile.* -
>> can't get it to work. Have looked at the documentation, where no examples
>> are shown at all. I've googled to find out, and noticed that others have
>> asked. But I never seem to find an answer.
>>
>> How should I enter the regex pattern to check my flowfile content for
>> this simple single string in the contents?
>>
>> Thanks in advance. -Jim
>>
>
>
>
> --
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information. Any
> unauthorized review, use, disclosure or distribution is prohibited. If you
> are not the intended recipient, please contact the sender by reply email
> and destroy all copies of the original message.
>

Re: How to get RouteOnContent to work

Posted by mayank rathi <ma...@gmail.com>.
Hello James,

I am using RouteOnContent with following properties and it's working fine
for me:

Match Requirement: content must contain match
Character Set: UTF-8
Content Buffer Size: 1 MB
ExpectedEvent: BILLING|PAYMNT|PAYADJ|CALLADJ

Basically I am looking for records that contain any of the following
strings:

BILLING
PAYMNT
PAYADJ
CALLADJ

Try requiresFile ( without quotes)

Thanks!!




On Thu, Sep 7, 2017 at 10:11 AM, James McMahon <js...@gmail.com> wrote:

> I'm trying to do something very simple: my flowfile is a series of keys
> and values in json. I'd like to look at the flowfile content and tell me if
> the string requiresFile is in there. RouteOnContent seems like just the
> processor I need, but I cannot get it to work. Here is what I set in its
> config:
>
> content must contain match
> UTF-8
> 1 MB
> and I create my own dynamic property
> hasFile  requiresFile
>
> I've also tried 'requiresFile', '.*requiresFile.*', .*requiresFile.* -
> can't get it to work. Have looked at the documentation, where no examples
> are shown at all. I've googled to find out, and noticed that others have
> asked. But I never seem to find an answer.
>
> How should I enter the regex pattern to check my flowfile content for this
> simple single string in the contents?
>
> Thanks in advance. -Jim
>



-- 
NOTICE: This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy
all copies of the original message.