<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NiFi Expression - Multiple OR - AND Conditions in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191146#M83644</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/83213/yjabbary.html" nodeid="83213" target="_blank"&gt;@yazeed salem&lt;/A&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method1:Using UpdateAttribute+RouteOnAttribute Processors&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it would be easier if you introduce new &lt;STRONG&gt;update attribute processor&lt;/STRONG&gt; before &lt;STRONG&gt;RouteOnAttribute&lt;/STRONG&gt; and prepare &lt;STRONG&gt;two new attributes&lt;/STRONG&gt; in &lt;STRONG&gt;UpdateAttribute processor.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92479-screen-shot-2018-09-18-at-84637-pm.png" style="width: 1446px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18440i2F71FA63923A04E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92479-screen-shot-2018-09-18-at-84637-pm.png" alt="92479-screen-shot-2018-09-18-at-84637-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then in RouteOnAttribute processor use &lt;STRONG&gt;or&lt;/STRONG&gt; function to &lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;Configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92480-screen-shot-2018-09-18-at-84747-pm.png" style="width: 1490px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18441i2B069F0DC0702F88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92480-screen-shot-2018-09-18-at-84747-pm.png" alt="92480-screen-shot-2018-09-18-at-84747-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now processor will route the flowfile to ROUTE1 relationship.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method2: By using RouteOnAttribute processor:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use the below expression in ROUTE1 property value&lt;/P&gt;&lt;P&gt;ROUTE1&lt;/P&gt;&lt;PRE&gt;${literal(${text.tag.type:equals('XXX'):and(${txt:contains('YES')})}):or(${text.tag.type:equals('YYY'):and(${txt:contains('NO')})})}&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92481-screen-shot-2018-09-18-at-85322-pm.png" style="width: 2168px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18442i2705F1618CE087BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92481-screen-shot-2018-09-18-at-85322-pm.png" alt="92481-screen-shot-2018-09-18-at-85322-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both Methods will result the flowfile into ROUTE1 relationship, Choose the method which best for your case.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue,&lt;STRONG&gt; Click on Accept button below to accept the answer, &lt;/STRONG&gt;That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 07:29:27 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-08-18T07:29:27Z</dc:date>
    <item>
      <title>NiFi Expression - Multiple OR - AND Conditions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191145#M83643</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using RouteONAttribute Processor and i defined a property and its value contains multiple OR and AND conditions like the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Property Name:&lt;/STRONG&gt; ROUTE1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Property Value:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;${text.tag.type:equals('XXX'):and(${txt:contains('YES')}):or(${text.tag.type:equals('YYY')}):and(${txt:contains('NO')})}&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The Issue i am facing is that after generating a flow file with attributes text.tag.type = XXX and txt = YES CORRECT it always route to &lt;STRONG&gt;unmatched &lt;/STRONG&gt;while it should route to &lt;STRONG&gt;ROUTE1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks ...&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 02:38:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191145#M83643</guid>
      <dc:creator>yjabbary</dc:creator>
      <dc:date>2018-09-19T02:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Expression - Multiple OR - AND Conditions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191146#M83644</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/83213/yjabbary.html" nodeid="83213" target="_blank"&gt;@yazeed salem&lt;/A&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method1:Using UpdateAttribute+RouteOnAttribute Processors&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it would be easier if you introduce new &lt;STRONG&gt;update attribute processor&lt;/STRONG&gt; before &lt;STRONG&gt;RouteOnAttribute&lt;/STRONG&gt; and prepare &lt;STRONG&gt;two new attributes&lt;/STRONG&gt; in &lt;STRONG&gt;UpdateAttribute processor.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92479-screen-shot-2018-09-18-at-84637-pm.png" style="width: 1446px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18440i2F71FA63923A04E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92479-screen-shot-2018-09-18-at-84637-pm.png" alt="92479-screen-shot-2018-09-18-at-84637-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then in RouteOnAttribute processor use &lt;STRONG&gt;or&lt;/STRONG&gt; function to &lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;Configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92480-screen-shot-2018-09-18-at-84747-pm.png" style="width: 1490px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18441i2B069F0DC0702F88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92480-screen-shot-2018-09-18-at-84747-pm.png" alt="92480-screen-shot-2018-09-18-at-84747-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now processor will route the flowfile to ROUTE1 relationship.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method2: By using RouteOnAttribute processor:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use the below expression in ROUTE1 property value&lt;/P&gt;&lt;P&gt;ROUTE1&lt;/P&gt;&lt;PRE&gt;${literal(${text.tag.type:equals('XXX'):and(${txt:contains('YES')})}):or(${text.tag.type:equals('YYY'):and(${txt:contains('NO')})})}&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="92481-screen-shot-2018-09-18-at-85322-pm.png" style="width: 2168px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18442i2705F1618CE087BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="92481-screen-shot-2018-09-18-at-85322-pm.png" alt="92481-screen-shot-2018-09-18-at-85322-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both Methods will result the flowfile into ROUTE1 relationship, Choose the method which best for your case.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue,&lt;STRONG&gt; Click on Accept button below to accept the answer, &lt;/STRONG&gt;That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:29:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191146#M83644</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T07:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Expression - Multiple OR - AND Conditions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191147#M83645</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;can i use this with filename i mean i would like to filename after validating two conditions in RouteONAttribute  &lt;/P&gt;&lt;P&gt;${filename:contains("csv.done")}:and ${filename:contains(".csv")} &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 18:32:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Expression-Multiple-OR-AND-Conditions/m-p/191147#M83645</guid>
      <dc:creator>nitindamle_123</dc:creator>
      <dc:date>2019-03-28T18:32:24Z</dc:date>
    </item>
  </channel>
</rss>

