<?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 Nifi Expression Language: anyDelineatedValue Question in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Expression-Language-anyDelineatedValue-Question/m-p/191866#M73592</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I just have a quick expression language question. Does the anyDelineatedValue return the whole attribute if the delimiter is not present.&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;number_list = 1000&lt;/P&gt;&lt;P&gt;${anyDelineatedValue("${number_list}, ","):startsWith("1")}&lt;/P&gt;&lt;P&gt;Would the above statement return True?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 13:23:20 GMT</pubDate>
    <dc:creator>richy004</dc:creator>
    <dc:date>2018-01-17T13:23:20Z</dc:date>
    <item>
      <title>Nifi Expression Language: anyDelineatedValue Question</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Expression-Language-anyDelineatedValue-Question/m-p/191866#M73592</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I just have a quick expression language question. Does the anyDelineatedValue return the whole attribute if the delimiter is not present.&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;number_list = 1000&lt;/P&gt;&lt;P&gt;${anyDelineatedValue("${number_list}, ","):startsWith("1")}&lt;/P&gt;&lt;P&gt;Would the above statement return True?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 13:23:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Expression-Language-anyDelineatedValue-Question/m-p/191866#M73592</guid>
      <dc:creator>richy004</dc:creator>
      <dc:date>2018-01-17T13:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Expression Language: anyDelineatedValue Question</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Expression-Language-anyDelineatedValue-Question/m-p/191867#M73593</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/57176/richy004.html" nodeid="57176" target="_blank"&gt;@Richard Scott&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes it returns True as attribute value.&lt;/P&gt;&lt;PRE&gt;${anyDelineatedValue("${number_list}, ","):startsWith("1")} //split the numbers_list string with ,(based on delimiter) and check any of the number_list values is starting with 1 (or) not.&lt;/PRE&gt;&lt;P&gt;As we are having just 1000 so number_list string then the expression language check for is the number_list any value is starting with 1 so the result is True.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For ${anyDelineatedValue("${number_list}, ","):startsWith("1")}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Case1:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;number_list 1000,2000,3000 
result True //because our expression language is checking for any of the delineated values and we are having 1000 which is starting with 1 so returns as True.&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Case2:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;number_list 2000,2000,3000 
result False //because any of the number list values are not starting with 1 so the result is False.&lt;/PRE&gt;&lt;P&gt;In Addition&lt;/P&gt;&lt;P&gt;You can evaluate the expression language by using &lt;B&gt;&lt;U&gt;Generate flowfile processor&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Configs:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="51412-generateflowfile.png" style="width: 1941px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18362iE17D25B8912F0C15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="51412-generateflowfile.png" alt="51412-generateflowfile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Drag and drop generate flowfile processor&lt;/LI&gt;&lt;LI&gt;Right click and click on Configure&lt;/LI&gt;&lt;LI&gt;In properties tab click on + sign that is highlighted in above screenshot and add new property as&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;number_list
&lt;/P&gt;&lt;PRE&gt;1000&lt;/PRE&gt;&lt;P&gt;4.Click on Scheduling Tab and keep Timerdriven with Run schedule as 11111111110 (or) some big number, so the processor trigger 1 flowfile after those many sec that we have given in Run Schedule value.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;UpdateAttribute 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="51413-update.png" style="width: 2072px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18363i733E84EF9B3CF752/image-size/medium?v=v2&amp;amp;px=400" role="button" title="51413-update.png" alt="51413-update.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Follow same steps as above and add &lt;STRONG&gt;new property as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ad(your property name)&lt;/P&gt;&lt;PRE&gt;${anyDelineatedValue("${number_list}",","):startsWith("1")}&lt;/PRE&gt;&lt;P&gt;After update attribute processor we are going to add ad attribute to the flowfile as result of expression that we mentioned i.e&lt;/P&gt;&lt;P&gt;${anyDelineatedValue("${number_list}",","):startsWith("1")}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="51414-output.png" style="width: 719px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18364i1437EF0A4D0D6F31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="51414-output.png" alt="51414-output.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In above screenshot we are having ad attribute having value as true.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flow Screenshot:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="51415-flow.png" style="width: 1844px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18365i011618FC5C14C031/image-size/medium?v=v2&amp;amp;px=400" role="button" title="51415-flow.png" alt="51415-flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Like this way you can test expression language using NiFi.&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 errors.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/7258iC23088E1199098D2/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="generateflowfile.png" title="generateflowfile.png" /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:19:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Expression-Language-anyDelineatedValue-Question/m-p/191867#M73593</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T07:19:19Z</dc:date>
    </item>
  </channel>
</rss>

