<?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 Extracting JSON data from a file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321852#M91848</link>
    <description>&lt;P&gt;Hello team, we have a json file with three loops Po, Delivery and Items,&lt;/P&gt;&lt;P&gt;we manage to extract data from the  file using  the tExtractjsonCompoenent (XPATH or JSONPATH) if  the files contains the the three loops &lt;/P&gt;&lt;P&gt;however we are facing this issues , i will try to explain in the following exemple &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'am reading a file named data.json   which contain &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; 2 PO (first  loop level )&lt;/LI&gt;&lt;LI&gt;2 Delivery  (seocnd  loop level )  - ---&amp;gt;  1 delivery in the first PO &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                                                               ----&amp;gt;  1 delivery in the second PO&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2 item (third loop level )          ------&amp;gt; 2 item in the  first delivery   of the  the first PO &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                                                           ------&amp;gt; the second PO does not include any item inside the the delivery level &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp7NAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150875iA28D6BE0D94659AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp7NAAR.png" alt="0695b00000Uyp7NAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we manage to read the first PO successfully as shown in the job  however we couldn't read the second PO beacasue it does not contain &lt;/P&gt;&lt;P&gt;the item level in the delivery so how can we read a complex Json file with  optional level (which means that the item level could exist in one PO&lt;/P&gt;&lt;P&gt;but not in the seocnd or in the thrid , it is an optinal element &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp7cAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131215i2594D5EF01F8FA0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp7cAAB.png" alt="0695b00000Uyp7cAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;  this is the configuration that we are doing in tExtractJson &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp8BAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154480iF92CC5C9E417833B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp8BAAR.png" alt="0695b00000Uyp8BAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp8LAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149078iA20AAB3AFC4AC016/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp8LAAR.png" alt="0695b00000Uyp8LAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:34:33 GMT</pubDate>
    <dc:creator>walidmas</dc:creator>
    <dc:date>2024-11-15T22:34:33Z</dc:date>
    <item>
      <title>Extracting JSON data from a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321852#M91848</link>
      <description>&lt;P&gt;Hello team, we have a json file with three loops Po, Delivery and Items,&lt;/P&gt;&lt;P&gt;we manage to extract data from the  file using  the tExtractjsonCompoenent (XPATH or JSONPATH) if  the files contains the the three loops &lt;/P&gt;&lt;P&gt;however we are facing this issues , i will try to explain in the following exemple &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'am reading a file named data.json   which contain &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; 2 PO (first  loop level )&lt;/LI&gt;&lt;LI&gt;2 Delivery  (seocnd  loop level )  - ---&amp;gt;  1 delivery in the first PO &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                                                               ----&amp;gt;  1 delivery in the second PO&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2 item (third loop level )          ------&amp;gt; 2 item in the  first delivery   of the  the first PO &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                                                           ------&amp;gt; the second PO does not include any item inside the the delivery level &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp7NAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150875iA28D6BE0D94659AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp7NAAR.png" alt="0695b00000Uyp7NAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we manage to read the first PO successfully as shown in the job  however we couldn't read the second PO beacasue it does not contain &lt;/P&gt;&lt;P&gt;the item level in the delivery so how can we read a complex Json file with  optional level (which means that the item level could exist in one PO&lt;/P&gt;&lt;P&gt;but not in the seocnd or in the thrid , it is an optinal element &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp7cAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131215i2594D5EF01F8FA0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp7cAAB.png" alt="0695b00000Uyp7cAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;  this is the configuration that we are doing in tExtractJson &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp8BAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154480iF92CC5C9E417833B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp8BAAR.png" alt="0695b00000Uyp8BAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Uyp8LAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149078iA20AAB3AFC4AC016/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Uyp8LAAR.png" alt="0695b00000Uyp8LAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321852#M91848</guid>
      <dc:creator>walidmas</dc:creator>
      <dc:date>2024-11-15T22:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON data from a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321853#M91849</link>
      <description>&lt;P&gt;I know this isn't ideal, but you can create 3 JSON inputs, each with the 3 JSON arrays and then merge them together&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 06:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321853#M91849</guid>
      <dc:creator>tchanabc</dc:creator>
      <dc:date>2022-09-10T06:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON data from a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321854#M91850</link>
      <description>&lt;P&gt;Hi @wmasmoudi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try by using three &lt;B&gt;tExtractJSONField &lt;/B&gt;components one-by-one like this and expand your JSON fields by extracting them. &lt;/P&gt;&lt;P&gt;For example: In your case, you can first extract &lt;B&gt;PO&lt;/B&gt; [ ..., Delivery,...] ------&amp;gt;  then expand the &lt;B&gt;Delivery&lt;/B&gt; [..., item,...]  ---------&amp;gt; then expand &lt;B&gt;Item&lt;/B&gt;. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000WtP54AAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144409i1869B2DCBBB43BCD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000WtP54AAF.png" alt="0695b00000WtP54AAF.png" /&gt;&lt;/span&gt;After that, you have fully expanded JSON with all the elements. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 18:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321854#M91850</guid>
      <dc:creator>KrishnaApurva</dc:creator>
      <dc:date>2022-09-20T18:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON data from a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321855#M91851</link>
      <description>&lt;P&gt;Hi , thanks for your answer , actually we tried that at the the beginning but the result was the same &lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 22:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extracting-JSON-data-from-a-file/m-p/2321855#M91851</guid>
      <dc:creator>Mehdi_Mhedhbi2</dc:creator>
      <dc:date>2022-09-26T22:03:54Z</dc:date>
    </item>
  </channel>
</rss>

