<?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: Split JSON after Convert Record (CSVtoJSON) creating 10,000 duplicate split records in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220896#M72515</link>
    <description>&lt;P&gt;@shu Thanks. It worked.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Dec 2017 01:13:03 GMT</pubDate>
    <dc:creator>rohancnaidu</dc:creator>
    <dc:date>2017-12-10T01:13:03Z</dc:date>
    <item>
      <title>Split JSON after Convert Record (CSVtoJSON) creating 10,000 duplicate split records</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220894#M72513</link>
      <description>&lt;P&gt;Sample Data:-&lt;/P&gt;&lt;P&gt;1,Michael,Jackson &lt;/P&gt;&lt;P&gt;2,Jim,Morrisson &lt;/P&gt;&lt;P&gt;3,John,Lennon &lt;/P&gt;&lt;P&gt;4,Freddie,Mercury &lt;/P&gt;&lt;P&gt;5,Elton,John&lt;/P&gt;&lt;P&gt;refer image CSVtoJSONJSON created successfully&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43902-csvtojson.png" style="width: 613px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15817i4F82C2411FF3C1FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43902-csvtojson.png" alt="43902-csvtojson.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Result After Convert Record (CSVtoJSON)&lt;/P&gt;&lt;P&gt;[ {
  "id" : 1,
  "firstName" : "Michael",
  "lastName" : "Jackson"
},&lt;/P&gt;&lt;P&gt;{
  "id" : 2,
  "firstName" : "Jim",
  "lastName" : "Morrisson"
}, &lt;/P&gt;&lt;P&gt;{
  "id" : 3,
  "firstName" : "John",
  "lastName" : "Lennon"
}, &lt;/P&gt;&lt;P&gt;{
  "id" : 4,
  "firstName" : "Freddie",
  "lastName" : "Mercury"
}, &lt;/P&gt;&lt;P&gt;{
  "id" : 5,
  "firstName" : "Elton",
  "lastName" : "John"
} ]&lt;/P&gt;&lt;P&gt;Applying SplitJSON to the convertrecord processor with jsonpath = $.* creates 10,000 splits in the queue&lt;/P&gt;&lt;P&gt;refer image SplitJSON10000splits&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43903-splitjson10000splits.png" style="width: 636px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15818i55523ABD29ACB096/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43903-splitjson10000splits.png" alt="43903-splitjson10000splits.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need to split the array of JSON into individuall JSON records and apply some transformation to these records&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:20:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220894#M72513</guid>
      <dc:creator>rohancnaidu</dc:creator>
      <dc:date>2019-08-18T02:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Split JSON after Convert Record (CSVtoJSON) creating 10,000 duplicate split records</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220895#M72514</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/48598/rohancnaidu.html" nodeid="48598" target="_blank"&gt;@Rohan Naidu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have connected Failure and Original relationships of split json looped back to same processor,&lt;/P&gt;&lt;P&gt;What does Original relationship means&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;The original FlowFile that was split into segments. If the FlowFile fails processing, nothing will be sent to this relationship i.e &lt;/STRONG&gt;your original flowfile will be transferred to this relationship&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Example of Original Flowfile:-&lt;/U&gt;&lt;/P&gt;&lt;P&gt;This message will be original flowfile&lt;/P&gt;&lt;PRE&gt;[{"id":1,"fname":"Michael","lname":"Jackson"},{"id":2,"fname":"Jim","lname":"Morrisson"},{"id":3,"fname":"John","lname":"Lennon"},{"id":4,"fname":"Freddie","lname":"Mercury"},{"id":5,"fname":"Elton","lname":"John"}]&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;in your case original relation loop back to split json and generating duplicates.&lt;/P&gt;&lt;P&gt;To &lt;STRONG&gt;resolve&lt;/STRONG&gt; this issue &lt;STRONG&gt;auto terminate original relation&lt;/STRONG&gt; by &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;Right Click on the Split json processor&lt;/LI&gt;&lt;LI&gt;Goto Settings tab &lt;/LI&gt;&lt;LI&gt;Click on Check box before Original relation&lt;/LI&gt;&lt;LI&gt;Then click on Apply button Right Below of the screen.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Auto terminate original Relationship:-&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="43905-original.png" style="width: 1909px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15815iB32D17F4BE1F4C7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43905-original.png" alt="43905-original.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Splitjson 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="43904-splitjson.png" style="width: 1353px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15816i607B2A6C4E1A43EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43904-splitjson.png" alt="43904-splitjson.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see above screenshot only failure relationship is loop back to the processor and we have auto terminated original relationship.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:20:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220895#M72514</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T02:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Split JSON after Convert Record (CSVtoJSON) creating 10,000 duplicate split records</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220896#M72515</link>
      <description>&lt;P&gt;@shu Thanks. It worked.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 01:13:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Split-JSON-after-Convert-Record-CSVtoJSON-creating-10-000/m-p/220896#M72515</guid>
      <dc:creator>rohancnaidu</dc:creator>
      <dc:date>2017-12-10T01:13:03Z</dc:date>
    </item>
  </channel>
</rss>

