<?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: How to capture number 0 in RouteOnAttribute in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-capture-number-0-in-RouteOnAttribute/m-p/282753#M210184</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71100"&gt;@vamcits&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use EvaluateJsonPath processor to extract the 0 from the json you shared&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-11-12 at 12.29.46 PM.png" style="width: 450px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25275iDB7DD10FBC31A5BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-11-12 at 12.29.46 PM.png" alt="Screen Shot 2019-11-12 at 12.29.46 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can name the custom property added above to whatever you like (I just used C0).&lt;BR /&gt;This will result in a "C0" attribute being generated on the FlowFile with a value of "[0]".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you don't wan the square brackets around the number, you can remove them using an updateAttribute processor as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-11-12 at 12.34.09 PM.png" style="width: 604px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25276iB2F6F902599DB389/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-11-12 at 12.34.09 PM.png" alt="Screen Shot 2019-11-12 at 12.34.09 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then you can perform your routing with the RouteOnAttribute processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 17:35:27 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-11-12T17:35:27Z</dc:date>
    <item>
      <title>How to capture number 0 in RouteOnAttribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-capture-number-0-in-RouteOnAttribute/m-p/282633#M210106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a requirement where-in I have to take a count(*) using &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-hive-nar/1.5.0/org.apache.nifi.processors.hive.SelectHiveQL/" target="_blank" rel="noopener"&gt;selecthiveQL&lt;/A&gt; and if count is 0 then I have to insert a row.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My flow is selectHive QL → RouteOnAttribute where in I am trying to capture the 0&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Json is as below:&lt;/P&gt;
&lt;P&gt;[ {&lt;BR /&gt;"_c0" : 0&lt;BR /&gt;} ]&lt;/P&gt;
&lt;P&gt;can some one please tell me how to capture this zero, I tried multiple ways but not able to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also if anyone has better solution pls let me know. This is quite urgent.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 20:29:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-capture-number-0-in-RouteOnAttribute/m-p/282633#M210106</guid>
      <dc:creator>vamcits</dc:creator>
      <dc:date>2019-11-11T20:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture number 0 in RouteOnAttribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-capture-number-0-in-RouteOnAttribute/m-p/282753#M210184</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71100"&gt;@vamcits&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use EvaluateJsonPath processor to extract the 0 from the json you shared&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-11-12 at 12.29.46 PM.png" style="width: 450px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25275iDB7DD10FBC31A5BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-11-12 at 12.29.46 PM.png" alt="Screen Shot 2019-11-12 at 12.29.46 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can name the custom property added above to whatever you like (I just used C0).&lt;BR /&gt;This will result in a "C0" attribute being generated on the FlowFile with a value of "[0]".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you don't wan the square brackets around the number, you can remove them using an updateAttribute processor as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-11-12 at 12.34.09 PM.png" style="width: 604px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25276iB2F6F902599DB389/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-11-12 at 12.34.09 PM.png" alt="Screen Shot 2019-11-12 at 12.34.09 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then you can perform your routing with the RouteOnAttribute processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 17:35:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-capture-number-0-in-RouteOnAttribute/m-p/282753#M210184</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-11-12T17:35:27Z</dc:date>
    </item>
  </channel>
</rss>

