Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

RountOnAttribute Multiple Conditions (Properties)

avatar
Explorer

I get two flow files and I need to look at the value of data in flow files based on two different conditions in RouteOnAttribute. If both the conditions match, then only the flow should be routed to executeSQL processor, else it should flow down to MonitorActivity Processor. I tried multiple ways, but this is not working. Every time, when one of the conditions match, it gets routed to executeSQL Processor. 

 

Screen Shot 2021-04-20 at 12.55.32 AM.pngScreen Shot 2021-04-20 at 1.03.42 AM.png

1 REPLY 1

avatar
Master Mentor

@ang_coder 

The RouteOnAttribute processor establishes a NEW relationship for each dynamic property you add. If you intent is that a single FlowFile must satisfy all conditions to route on, then you should have just one NiFi Expression Language (NEL) statement that covers all conditions resulting a true or false boolean. 

If you share your two statements, I'd be happy to help you construct a single NEL statement.
butt would be structured something like something like:
MattWho_0-1623159533817.png
All 4 lines would need to result in true before FlowFile would be related to this dynamic property's relationship.

If you found this addressed your query, please take a moment to login and click "Accept" on this solution.
Thank you,

Matt