nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Payne <>
Subject Re: Detect whether a flowfile has a particular attribute
Date Thu, 08 Jun 2017 12:44:48 GMT

You can use the expression:


Or, alternatively, depending on how you want to setup the route:


If you want to check if the attribute contains 'True' somewhere within its value,
then you can use:



> On Jun 8, 2017, at 8:19 AM, James McMahon <> wrote:
> Good morning. I receive HTTP POSTs of various types of files. Some have a particular
attribute myAttribute, some do not. I want to route the flowfiles to different workflow paths
depending on the presence of this attribute. Can I use RouteAttribute and the expression language
to do that, something like this:
> hasTheAttributeOfInterest           ${anyAttribute("myAttribute":contains('True')}
> I ask because the expression guide did not say whether a False is returned or the processor
throws an error if the attribute does not exist in the flowfile. I may have missed that. I
wanted to see if anyone in the group has experience in this regard? 
> Thanks in advance for your insights. -Jim

View raw message