<?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>topic Parse multi record JSON file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252094#M35842</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a input file with multiple JSON records separated by newline. I need to know how we can parse there records. tFileinputJSON only reads first record and ignores all other records as its intended to be used for one json record file but here this file has multiple json records separated by newline.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to extract firstname and lastname but not array elements. i have used tFileInputFullRow to read all json objects as each record with newline and then linked to tExtractJSONfield.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{ "firstname" : "abc" , "lastname" : "def" , "city" : [ "aaa" , "bbb" ]}&lt;/P&gt;
&lt;P&gt;{ "firstname" : "ghi" , "lastname" : "jkl" , "city" : [ "ccc" , "ddd" ]}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected Output&lt;/P&gt;
&lt;P&gt;firstname | lastname | city&lt;/P&gt;
&lt;P&gt;abc | def | aaa&lt;/P&gt;
&lt;P&gt;abc| def | bbb&lt;/P&gt;
&lt;P&gt;ghi| jkl| ccc&lt;/P&gt;
&lt;P&gt;ghi|kjl ddd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2019 02:49:30 GMT</pubDate>
    <dc:creator>ankushdeshpande</dc:creator>
    <dc:date>2019-11-13T02:49:30Z</dc:date>
    <item>
      <title>Parse multi record JSON file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252094#M35842</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a input file with multiple JSON records separated by newline. I need to know how we can parse there records. tFileinputJSON only reads first record and ignores all other records as its intended to be used for one json record file but here this file has multiple json records separated by newline.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to extract firstname and lastname but not array elements. i have used tFileInputFullRow to read all json objects as each record with newline and then linked to tExtractJSONfield.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{ "firstname" : "abc" , "lastname" : "def" , "city" : [ "aaa" , "bbb" ]}&lt;/P&gt;
&lt;P&gt;{ "firstname" : "ghi" , "lastname" : "jkl" , "city" : [ "ccc" , "ddd" ]}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected Output&lt;/P&gt;
&lt;P&gt;firstname | lastname | city&lt;/P&gt;
&lt;P&gt;abc | def | aaa&lt;/P&gt;
&lt;P&gt;abc| def | bbb&lt;/P&gt;
&lt;P&gt;ghi| jkl| ccc&lt;/P&gt;
&lt;P&gt;ghi|kjl ddd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 02:49:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252094#M35842</guid>
      <dc:creator>ankushdeshpande</dc:creator>
      <dc:date>2019-11-13T02:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Parse multi record JSON file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252095#M35843</link>
      <description>&lt;P&gt;hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;using 1º&amp;nbsp;&lt;SPAN&gt;tExtractJSONfield with&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;JSON field -&amp;gt; line&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Loop Jsonpath query "$"&lt;/P&gt; 
&lt;P&gt;mapping:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;column&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;json query&lt;/P&gt; 
&lt;P&gt;city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "city[*]"&lt;/P&gt; 
&lt;P&gt;firstname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"firtsname"&lt;/P&gt; 
&lt;P&gt;lastname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"lastname"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;connect directly to other&amp;nbsp;&lt;SPAN&gt;tExtractJSONfield&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;with JSON field -&amp;gt;city&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Loop Jsonpath query "$[*]"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;column&amp;nbsp; &amp;nbsp;Json query&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"$"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;then connect to tjavarow&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;//code start&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;output_row.city = input_row.city;&lt;BR /&gt;output_row.firstname = row17.firstname;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;output_row.lastname = row17.lastname;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;//code end&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;where&amp;nbsp;&lt;SPAN&gt;row17 is the row number(Main) after&amp;nbsp;1º&amp;nbsp;tExtractJSONfield &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;output:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;.------------------------------------------------------------------------.&lt;BR /&gt;| tLogRow_9 |&lt;BR /&gt;|=----------------------------------------------------------------------=|&lt;BR /&gt;|line |&lt;BR /&gt;|=----------------------------------------------------------------------=|&lt;BR /&gt;|{ "firstname" : "abc" , "lastname" : "def" , "city" : [ "aaa" , "bbb" ]}|&lt;BR /&gt;|{ "firstname" : "ghi" , "lastname" : "jkl" , "city" : [ "ccc" , "ddd" ]}|&lt;BR /&gt;'------------------------------------------------------------------------'&lt;/P&gt; 
&lt;P&gt;.---------+--------+----.&lt;BR /&gt;| tLogRow_12 |&lt;BR /&gt;|=--------+--------+---=|&lt;BR /&gt;|firstname|lastname|city|&lt;BR /&gt;|=--------+--------+---=|&lt;BR /&gt;|abc |def |aaa |&lt;BR /&gt;|abc |def |bbb |&lt;BR /&gt;|ghi |jkl |ccc |&lt;BR /&gt;|ghi |jkl |ddd |&lt;BR /&gt;'---------+--------+----'&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;see attached image - im using tlogrow after tjavaRow&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LxA5"&gt;json_parse.png&lt;/A&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252095#M35843</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2019-11-13T16:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Parse multi record JSON file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252096#M35844</link>
      <description>Thank You SO much 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Worked Well</description>
      <pubDate>Mon, 18 Nov 2019 22:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-multi-record-JSON-file/m-p/2252096#M35844</guid>
      <dc:creator>ankushdeshpande</dc:creator>
      <dc:date>2019-11-18T22:04:30Z</dc:date>
    </item>
  </channel>
</rss>

