<?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 processor - route json array into multiple json arrays based on condition on json filed/attribute in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128725#M43372</link>
    <description>&lt;P&gt;thank you . is it possible add 2 condition for content like a=='1 ' or a=='2' (or) a=='1' and i=='ss' . Thanks in advance&lt;/P&gt;</description>
    <pubDate>Sat, 15 Oct 2016 02:57:25 GMT</pubDate>
    <dc:creator>srinivaspadala_</dc:creator>
    <dc:date>2016-10-15T02:57:25Z</dc:date>
    <item>
      <title>Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128722#M43369</link>
      <description>&lt;P&gt;Is there any Nifi processor to route mulitple json arrays(by splitting json array based on field/attribute condition) to multiple processor based on json field condition .&lt;/P&gt;&lt;P&gt;ex : assume [{a:1},{a:1},{a:2},{a:2}]  is jsonarray , there is a requiremnt to route a=1 contained json files are send to another processor as array . and a=2 json array to another processor&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 09:04:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128722#M43369</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-10-13T09:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128723#M43370</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I hope I understand your question properly.&lt;/P&gt;&lt;P&gt;If you want to split the example JSON into two flow-files, each contains an array of elements with a=1, or a=2, then following flow can do the job. The point is passing the same JSON flow-file into two EvaluateJsonPath processors, then each EvaluateJsonPath extract array based on its own interest, using JSON path like '$.[?(@.a=='2')]'.&lt;/P&gt;&lt;P&gt;I've tested with an input JSON:&lt;/P&gt;&lt;P&gt;[{"a":1, "i": 1},{"a":1, "i": 2},{"a":2, "i": 3},{"a":2, "i": 4}]&lt;/P&gt;&lt;P&gt;Then, I got on left side:&lt;/P&gt;&lt;P&gt;[{"a":1,"i":1},{"a":1,"i":2}]&lt;/P&gt;&lt;P&gt;on right side:&lt;/P&gt;&lt;P&gt;[{"a":2,"i":3},{"a":2,"i":4}]&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8506-nifi-evaluate-json-flow.png" style="width: 1492px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22503iDC2ABC150CF54FB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8506-nifi-evaluate-json-flow.png" alt="8506-nifi-evaluate-json-flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8507-nifi-evaluate-json-config.png" style="width: 1114px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22504i54D492E6FD381808/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8507-nifi-evaluate-json-config.png" alt="8507-nifi-evaluate-json-config.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 09:48:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128723#M43370</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2019-08-19T09:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128724#M43371</link>
      <description>&lt;P&gt;Another solution would be:&lt;/P&gt;&lt;P&gt;SplitJson -&amp;gt; EvaluateJsonPath (store a on attribute) -&amp;gt; RouteOnAttribute -&amp;gt; MergeContent&lt;/P&gt;&lt;P&gt;But if the desired output is JSON array, using EvaluateJsonPath is simpler.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 09:41:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128724#M43371</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2016-10-13T09:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128725#M43372</link>
      <description>&lt;P&gt;thank you . is it possible add 2 condition for content like a=='1 ' or a=='2' (or) a=='1' and i=='ss' . Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 02:57:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128725#M43372</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-10-15T02:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128726#M43373</link>
      <description>&lt;P&gt;what is this expression languauge : $.[?(@.a...] , is it jave regex ?
how can we use 2 values filter OR or AND for content filed ?? like a==1 or a==2 . &lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 07:04:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128726#M43373</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-10-15T07:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128727#M43374</link>
      <description>&lt;P&gt;Hello, sorry for the delay. The language is JSONPath. JSONPath itself has filtering capabilities. Many examples can be found on this page. &lt;A href="https://github.com/jayway/JsonPath" target="_blank"&gt;https://github.com/jayway/JsonPath&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:53:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128727#M43374</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2016-10-17T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128728#M43375</link>
      <description>&lt;P&gt;how to append values for empty flowfile attributes for JSON format data. i.e suppose i have 40 columns with JSON data consuming from kafka queue and i have values for 25  fields only and remaining 15 fields, i don't have values .So i put the json into EvaluateJsonPath processor and converted into  flowfile attributes ..From some other processor i am getting values for those empty attributes so i need to append/fill the empty attributes with the values with orginal json file.&lt;/P&gt;&lt;P&gt;Can you please suggest how to use it?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 23:27:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/128728#M43375</guid>
      <dc:creator>adhishankarit</dc:creator>
      <dc:date>2017-06-19T23:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi processor - route json array into multiple json arrays based on condition on json filed/attribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/294689#M43376</link>
      <description>&lt;P&gt;I have some sort of the same scenario. But I have to route out on department value, like department="IT" route to some other flow and for department="DB" route to another flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that, I have written out expression as&amp;nbsp;&amp;nbsp;$.[?(@.department=="DB")]. But this doesn't work. Please suggest for the above scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also if we have to apply some conditions like route data for a&amp;gt;10 like that.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:45:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-processor-route-json-array-into-multiple-json-arrays/m-p/294689#M43376</guid>
      <dc:creator>ravi_sh_DS</dc:creator>
      <dc:date>2020-04-24T14:45:23Z</dc:date>
    </item>
  </channel>
</rss>

