<?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 SplitJSON doesnt split anything in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/349959#M235835</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm new to nifi so my problem may be dumb. Sorry if it seems really basic.&lt;BR /&gt;&lt;BR /&gt;I'm trying to use nifi to :&lt;/P&gt;&lt;P&gt;1/ Read a JSON response from a REST GET endpoint.&lt;BR /&gt;2/ Parse the JSON and split some JSON array into JSON objects&lt;/P&gt;&lt;P&gt;3/ insert objects in SQL.&lt;BR /&gt;&lt;BR /&gt;I'm stuck at Step 2 because my SplitJSON doesnt return anything. No error as well.&lt;/P&gt;&lt;P&gt;Here is a sample of my JSON :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "context":"q%3D%2523all%26q.restriction%3Dclass%253Acr_hashtag%26of%3Djson",
   "nhits":1000000,
   "nmatches":1000000,
   "start":0,
   "ellql":"#query{nbdocs=26966678, text_relevance.expr=\"@term.score*@proximity+@b\", noproximity, term.score=NO_RANKING}(#and(#true() #category(categories,\"Top/datamodelclass/cr_hashtag\") ))",
   "executor":null,
   "estimated":false,
   "autocorrected":false,
   "spellCheckSuggestions":{
      "origStr":null,
      "suggestions":[
         
      ]
   },
   "hits":[
      {
         "did":1,
         "url":"ID=10055&amp;amp;",
         "buildGroup":"bg0",
         "source":null,
         "slice":3,
         "score":0,
         "sort":0,
         "groups":[
            
         ],
         "metas":[
            {
               "name":"created_by",
               "type":2,
               "value":"L37"
            },
            {
               "name":"created_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"last_modified_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"legal_entity_id",
               "type":2,
               "value":"100000000000313"
            },
            {
               "name":"source",
               "type":2,
               "value":"consolidation-cbx_bg0"
            },
            {
               "name":"tags",
               "type":2,
               "value":"test10055"
            },
            {
               "name":"id",
               "type":2,
               "value":"10055"
            },
            {
               "name":"url",
               "type":2,
               "value":"ID=10055&amp;amp;"
            }
         ]
      },
      {
         "did":2,
         "url":"ID=10119&amp;amp;",
         "buildGroup":"bg0",
         "source":null,
         "slice":4,
         "score":0,
         "sort":0,
         "groups":[
            
         ],
         "metas":[
            {
               "name":"created_by",
               "type":2,
               "value":"L37"
            },
            {
               "name":"created_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"last_modified_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"legal_entity_id",
               "type":2,
               "value":"100000000000313"
            },
            {
               "name":"source",
               "type":2,
               "value":"consolidation-cbx_bg0"
            },
            {
               "name":"tags",
               "type":2,
               "value":"test10119"
            },
            {
               "name":"id",
               "type":2,
               "value":"10119"
            },
            {
               "name":"url",
               "type":2,
               "value":"ID=10119&amp;amp;"
            }
         ]
      }
   ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to split the "hits" array.&lt;BR /&gt;This is my nifi config so far. I'm able to get the JSON from the invokeHTTP&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="totokogure_0-1660233515123.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35146iEEFE4DF91F0935A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_0-1660233515123.png" alt="totokogure_0-1660233515123.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="totokogure_2-1660233609266.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35148i78EEA1511FB7198E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_2-1660233609266.png" alt="totokogure_2-1660233609266.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="totokogure_1-1660233542248.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35147i7FCDDC751FB1CEAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_1-1660233542248.png" alt="totokogure_1-1660233542248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Still, the output of the relation "split" is empty... The one of "failure" as well. I have no idea what's going on.&lt;/P&gt;&lt;P&gt;What am i doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 16:02:44 GMT</pubDate>
    <dc:creator>totokogure</dc:creator>
    <dc:date>2022-08-11T16:02:44Z</dc:date>
    <item>
      <title>SplitJSON doesnt split anything</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/349959#M235835</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm new to nifi so my problem may be dumb. Sorry if it seems really basic.&lt;BR /&gt;&lt;BR /&gt;I'm trying to use nifi to :&lt;/P&gt;&lt;P&gt;1/ Read a JSON response from a REST GET endpoint.&lt;BR /&gt;2/ Parse the JSON and split some JSON array into JSON objects&lt;/P&gt;&lt;P&gt;3/ insert objects in SQL.&lt;BR /&gt;&lt;BR /&gt;I'm stuck at Step 2 because my SplitJSON doesnt return anything. No error as well.&lt;/P&gt;&lt;P&gt;Here is a sample of my JSON :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "context":"q%3D%2523all%26q.restriction%3Dclass%253Acr_hashtag%26of%3Djson",
   "nhits":1000000,
   "nmatches":1000000,
   "start":0,
   "ellql":"#query{nbdocs=26966678, text_relevance.expr=\"@term.score*@proximity+@b\", noproximity, term.score=NO_RANKING}(#and(#true() #category(categories,\"Top/datamodelclass/cr_hashtag\") ))",
   "executor":null,
   "estimated":false,
   "autocorrected":false,
   "spellCheckSuggestions":{
      "origStr":null,
      "suggestions":[
         
      ]
   },
   "hits":[
      {
         "did":1,
         "url":"ID=10055&amp;amp;",
         "buildGroup":"bg0",
         "source":null,
         "slice":3,
         "score":0,
         "sort":0,
         "groups":[
            
         ],
         "metas":[
            {
               "name":"created_by",
               "type":2,
               "value":"L37"
            },
            {
               "name":"created_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"last_modified_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"legal_entity_id",
               "type":2,
               "value":"100000000000313"
            },
            {
               "name":"source",
               "type":2,
               "value":"consolidation-cbx_bg0"
            },
            {
               "name":"tags",
               "type":2,
               "value":"test10055"
            },
            {
               "name":"id",
               "type":2,
               "value":"10055"
            },
            {
               "name":"url",
               "type":2,
               "value":"ID=10055&amp;amp;"
            }
         ]
      },
      {
         "did":2,
         "url":"ID=10119&amp;amp;",
         "buildGroup":"bg0",
         "source":null,
         "slice":4,
         "score":0,
         "sort":0,
         "groups":[
            
         ],
         "metas":[
            {
               "name":"created_by",
               "type":2,
               "value":"L37"
            },
            {
               "name":"created_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"last_modified_dttm",
               "type":2,
               "value":"2022/07/13 11:29:30"
            },
            {
               "name":"legal_entity_id",
               "type":2,
               "value":"100000000000313"
            },
            {
               "name":"source",
               "type":2,
               "value":"consolidation-cbx_bg0"
            },
            {
               "name":"tags",
               "type":2,
               "value":"test10119"
            },
            {
               "name":"id",
               "type":2,
               "value":"10119"
            },
            {
               "name":"url",
               "type":2,
               "value":"ID=10119&amp;amp;"
            }
         ]
      }
   ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to split the "hits" array.&lt;BR /&gt;This is my nifi config so far. I'm able to get the JSON from the invokeHTTP&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="totokogure_0-1660233515123.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35146iEEFE4DF91F0935A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_0-1660233515123.png" alt="totokogure_0-1660233515123.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="totokogure_2-1660233609266.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35148i78EEA1511FB7198E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_2-1660233609266.png" alt="totokogure_2-1660233609266.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="totokogure_1-1660233542248.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35147i7FCDDC751FB1CEAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_1-1660233542248.png" alt="totokogure_1-1660233542248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Still, the output of the relation "split" is empty... The one of "failure" as well. I have no idea what's going on.&lt;/P&gt;&lt;P&gt;What am i doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:02:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/349959#M235835</guid>
      <dc:creator>totokogure</dc:creator>
      <dc:date>2022-08-11T16:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: SplitJSON doesnt split anything</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/349990#M235840</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99774"&gt;@totokogure&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested this on the same version of NiFi that you're using (1.17.0) and it worked fine for me.&lt;/P&gt;&lt;P&gt;The sample content that you provided was split in 2 flowfiles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 05:40:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/349990#M235840</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-12T05:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: SplitJSON doesnt split anything</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350018#M235850</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for testing it. I also tried it with a different flow from raw JSON file read through GetFile Processor and managed to split the&amp;nbsp; JSON.&lt;BR /&gt;&lt;BR /&gt;So as we can say it's not because of the SplitJSON processor, doest it mean i have some issue with the input format received from the SplitJSON aka the output of the InvokedHTTP?&lt;BR /&gt;&lt;BR /&gt;Is there any chance that SplitJSON doesnt recognise the http response as a JSON and skips it?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="totokogure_0-1660306472351.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35158i995781AFE79B8BD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_0-1660306472351.png" alt="totokogure_0-1660306472351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 12:17:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350018#M235850</guid>
      <dc:creator>totokogure</dc:creator>
      <dc:date>2022-08-12T12:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: SplitJSON doesnt split anything</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350027#M235853</link>
      <description>&lt;P&gt;I managed to make it work by introducing a evaluateJsonPath between invokehttp and splitjson :&amp;nbsp;&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="totokogure_0-1660309523708.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35159i362095D3954332F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_0-1660309523708.png" alt="totokogure_0-1660309523708.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Config of evaluateJSONPath:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="totokogure_1-1660309539268.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35160i96A7C0D7CA186CB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_1-1660309539268.png" alt="totokogure_1-1660309539268.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Config of SplitJSON:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="totokogure_2-1660309585805.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35161iDE5BE9E8EF804F15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="totokogure_2-1660309585805.png" alt="totokogure_2-1660309585805.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it supposed to work like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 13:06:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350027#M235853</guid>
      <dc:creator>totokogure</dc:creator>
      <dc:date>2022-08-12T13:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: SplitJSON doesnt split anything</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350070#M235870</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99774"&gt;@totokogure&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The EvaluateJsonPath that you added is extracting the &lt;FONT face="courier new,courier"&gt;$.hits&lt;/FONT&gt; array and storing it as an attribute. The next processor (SplitJson), does not even use that attribute, though. It extracts &lt;FONT face="courier new,courier"&gt;$.hits&lt;/FONT&gt;&amp;nbsp;again from the flowfile content. The&amp;nbsp;EvaluateJsonPath in this flow should be unnecessary. If you connected InvokeHTTP to SplitJson, things should work correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2022 22:58:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SplitJSON-doesnt-split-anything/m-p/350070#M235870</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-14T22:58:01Z</dc:date>
    </item>
  </channel>
</rss>

