You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Sethuram, Anup" <an...@philips.com> on 2015/04/28 09:15:20 UTC

using RouteOnAttribute


Hi,
I was trying to use RouteOnAttribute to distribute my data based on the type and configured it as below. But the below configuration didn’t work.
I’d like to understand how the regex needs to be defined in the value field. Is it java pattern matching?

 [screenshot.png]


Regards,
anup


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: using RouteOnAttribute

Posted by Mark Payne <ma...@hotmail.com>.
Anup,

Sorry, I'm coming to the party a bit late here, but wanted to point out 
a couple of things that may be useful to you.

Corey is correct - the Expression Language Guide should be in the help 
menu. This is written very much as a reference guide.

Another NiFi feature that could be very useful for you, though, is the 
"auto-complete" feature. When you are editing a property value, after 
you type "${", you can press Ctrl + Space. This will give you an 
auto-complete feature where you can choose which function you want to 
use, and it will also provide you documentation on each function. I.e., 
what the function does, what arguments it expects, return value, etc.

Hope this helps!
-Mark




------ Original Message ------
From: "Corey Flowers" <cf...@onyxpoint.com>
To: "dev@nifi.incubator.apache.org" <de...@nifi.incubator.apache.org>
Sent: 4/28/2015 7:06:31 AM
Subject: Re: using RouteOnAttribute

>Good morning Anup,
>
>          The expression language guide should be under the help link in 
>the upper right corner of you instance. Or you could right click on a 
>processor, select usage and then scroll to the top of the list. I 
>believe it is the second link, just below the user guide.
>
>Sent from my iPhone
>
>>  On Apr 28, 2015, at 6:57 AM, Sethuram, Anup 
>><an...@philips.com> wrote:
>>
>>  Thanks Brandon, That worked. It would be great if you could point me 
>>towards the expression language guide.
>>
>>
>>>  On 28-Apr-2015, at 1:45 pm, Brandon DeVries <br...@jhu.edu> wrote:
>>>
>>>  Anup,
>>>
>>>  In this case you would want to use the "matches" function as opposed 
>>>to
>>>  "equals". Also, in the email I'm not seeing a closing quote on the 
>>>value
>>>  inside the parentheses. Please let us know if you have any other
>>>  questions. Thanks.
>>>
>>>  All,
>>>
>>>  I thought we had an expression language guide, but I couldn't find 
>>>it on
>>>  the site... Does anyone have that link, or am I just wrong?
>>>
>>>  Brandon
>>>
>>>  On Tue, Apr 28, 2015, 3:32 AM Sethuram, Anup 
>>><an...@philips.com>
>>>  wrote:
>>>
>>>>
>>>>  Configuration used:
>>>>
>>>>  Routing Strategy: Route to Property name
>>>>
>>>>  Added two custom properties:
>>>>
>>>>  csv = ${filename:equals('.*.csv)}
>>>>  log = ${filename:equals('.*.log)}
>>>>
>>>>  On 28-Apr-2015, at 12:45 pm, Sethuram, Anup 
>>>><anup.sethuram@philips.com
>>>>  <ma...@philips.com>> wrote:
>>>>
>>>>
>>>>
>>>>  Hi,
>>>>  I was trying to use RouteOnAttribute to distribute my data based on 
>>>>the
>>>>  type and configured it as below. But the below configuration didn't 
>>>>work.
>>>>  I'd like to understand how the regex needs to be defined in the 
>>>>value
>>>>  field. Is it java pattern matching?
>>>>
>>>>
>>>>
>>>>
>>>>  Regards,
>>>>  anup
>>>>
>>>>
>>>>  ________________________________
>>>>  The information contained in this message may be confidential and 
>>>>legally
>>>>  protected under applicable law. The message is intended solely for 
>>>>the
>>>>  addressee(s). If you are not the intended recipient, you are hereby
>>>>  notified that any use, forwarding, dissemination, or reproduction 
>>>>of this
>>>>  message is strictly prohibited and may be unlawful. If you are not 
>>>>the
>>>>  intended recipient, please contact the sender by return e-mail and 
>>>>destroy
>>>>  all copies of the original message.
>>
>>
>>  ________________________________
>>  The information contained in this message may be confidential and 
>>legally protected under applicable law. The message is intended solely 
>>for the addressee(s). If you are not the intended recipient, you are 
>>hereby notified that any use, forwarding, dissemination, or 
>>reproduction of this message is strictly prohibited and may be 
>>unlawful. If you are not the intended recipient, please contact the 
>>sender by return e-mail and destroy all copies of the original 
>>message.

Re: using RouteOnAttribute

Posted by Corey Flowers <cf...@onyxpoint.com>.
Good morning Anup,

         The expression language guide should be under the help link in the upper right corner of you instance. Or you could right click on a processor, select usage and then scroll to the top of the list. I believe it is the second link, just below the user guide. 

Sent from my iPhone

> On Apr 28, 2015, at 6:57 AM, Sethuram, Anup <an...@philips.com> wrote:
> 
> Thanks Brandon, That worked. It would be great if you could point me towards the expression language guide.
> 
> 
>> On 28-Apr-2015, at 1:45 pm, Brandon DeVries <br...@jhu.edu> wrote:
>> 
>> Anup,
>> 
>> In this case you would want to use the "matches" function as opposed to
>> "equals". Also,  in the email I'm not seeing a closing quote on the value
>> inside the parentheses.  Please let us know if you have any other
>> questions.  Thanks.
>> 
>> All,
>> 
>> I thought we had an expression language guide,  but I couldn't find it on
>> the site... Does anyone have that link, or am I just wrong?
>> 
>> Brandon
>> 
>> On Tue, Apr 28, 2015, 3:32 AM Sethuram, Anup <an...@philips.com>
>> wrote:
>> 
>>> 
>>> Configuration used:
>>> 
>>> Routing Strategy: Route to Property name
>>> 
>>> Added two custom properties:
>>> 
>>> csv =  ${filename:equals('.*.csv)}
>>> log  =  ${filename:equals('.*.log)}
>>> 
>>> On 28-Apr-2015, at 12:45 pm, Sethuram, Anup <anup.sethuram@philips.com
>>> <ma...@philips.com>> wrote:
>>> 
>>> 
>>> 
>>> Hi,
>>> I was trying to use RouteOnAttribute to distribute my data based on the
>>> type and configured it as below. But the below configuration didn't work.
>>> I'd like to understand how the regex needs to be defined in the value
>>> field. Is it java pattern matching?
>>> 
>>> 
>>> 
>>> 
>>> Regards,
>>> anup
>>> 
>>> 
>>> ________________________________
>>> The information contained in this message may be confidential and legally
>>> protected under applicable law. The message is intended solely for the
>>> addressee(s). If you are not the intended recipient, you are hereby
>>> notified that any use, forwarding, dissemination, or reproduction of this
>>> message is strictly prohibited and may be unlawful. If you are not the
>>> intended recipient, please contact the sender by return e-mail and destroy
>>> all copies of the original message.
> 
> 
> ________________________________
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: using RouteOnAttribute

Posted by "Sethuram, Anup" <an...@philips.com>.
Thanks Brandon, That worked. It would be great if you could point me towards the expression language guide.


> On 28-Apr-2015, at 1:45 pm, Brandon DeVries <br...@jhu.edu> wrote:
>
> Anup,
>
> In this case you would want to use the "matches" function as opposed to
> "equals". Also,  in the email I'm not seeing a closing quote on the value
> inside the parentheses.  Please let us know if you have any other
> questions.  Thanks.
>
> All,
>
> I thought we had an expression language guide,  but I couldn't find it on
> the site... Does anyone have that link, or am I just wrong?
>
> Brandon
>
> On Tue, Apr 28, 2015, 3:32 AM Sethuram, Anup <an...@philips.com>
> wrote:
>
>>
>> Configuration used:
>>
>> Routing Strategy: Route to Property name
>>
>> Added two custom properties:
>>
>> csv =  ${filename:equals('.*.csv)}
>> log  =  ${filename:equals('.*.log)}
>>
>> On 28-Apr-2015, at 12:45 pm, Sethuram, Anup <anup.sethuram@philips.com
>> <ma...@philips.com>> wrote:
>>
>>
>>
>> Hi,
>> I was trying to use RouteOnAttribute to distribute my data based on the
>> type and configured it as below. But the below configuration didn't work.
>> I'd like to understand how the regex needs to be defined in the value
>> field. Is it java pattern matching?
>>
>>
>>
>>
>> Regards,
>> anup
>>
>>
>> ________________________________
>> The information contained in this message may be confidential and legally
>> protected under applicable law. The message is intended solely for the
>> addressee(s). If you are not the intended recipient, you are hereby
>> notified that any use, forwarding, dissemination, or reproduction of this
>> message is strictly prohibited and may be unlawful. If you are not the
>> intended recipient, please contact the sender by return e-mail and destroy
>> all copies of the original message.
>>
>>


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: using RouteOnAttribute

Posted by Brandon DeVries <br...@jhu.edu>.
Anup,

In this case you would want to use the "matches" function as opposed to
"equals". Also,  in the email I'm not seeing a closing quote on the value
inside the parentheses.  Please let us know if you have any other
questions.  Thanks.

All,

I thought we had an expression language guide,  but I couldn't find it on
the site... Does anyone have that link, or am I just wrong?

Brandon

On Tue, Apr 28, 2015, 3:32 AM Sethuram, Anup <an...@philips.com>
wrote:

>
> Configuration used:
>
> Routing Strategy: Route to Property name
>
> Added two custom properties:
>
> csv =  ${filename:equals('.*.csv)}
> log  =  ${filename:equals('.*.log)}
>
> On 28-Apr-2015, at 12:45 pm, Sethuram, Anup <anup.sethuram@philips.com
> <ma...@philips.com>> wrote:
>
>
>
> Hi,
> I was trying to use RouteOnAttribute to distribute my data based on the
> type and configured it as below. But the below configuration didn't work.
> I'd like to understand how the regex needs to be defined in the value
> field. Is it java pattern matching?
>
>
>
>
> Regards,
> anup
>
>
> ________________________________
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby
> notified that any use, forwarding, dissemination, or reproduction of this
> message is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please contact the sender by return e-mail and destroy
> all copies of the original message.
>
>

Re: using RouteOnAttribute

Posted by "Sethuram, Anup" <an...@philips.com>.
Configuration used:

Routing Strategy: Route to Property name

Added two custom properties:

csv =  ${filename:equals(‘.*.csv)}
log  =  ${filename:equals(‘.*.log)}

On 28-Apr-2015, at 12:45 pm, Sethuram, Anup <an...@philips.com>> wrote:



Hi,
I was trying to use RouteOnAttribute to distribute my data based on the type and configured it as below. But the below configuration didn’t work.
I’d like to understand how the regex needs to be defined in the value field. Is it java pattern matching?




Regards,
anup


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.