<?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 Struggling to extract API response to table format in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Struggling-to-extract-API-response-to-table-format/m-p/2344714#M112326</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to split out a response from tRESTClient into table format using tExtractJSONFields, but am not getting anything in the results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the config of my &lt;/P&gt;&lt;P&gt;tExtractJSONFields component.&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="0695b00000cg2EfAAI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155768i61BBD7D397AB9FD4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2EfAAI.png" alt="0695b00000cg2EfAAI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what the tRESTClient response looks like in its raw format.&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="0695b00000cg2FOAAY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151823iCC41BA52AB552120/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2FOAAY.png" alt="0695b00000cg2FOAAY.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is the result of running the job. As you can see I have NULL it both columns.&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="0695b00000cg2EuAAI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148943i00A7B29C684202CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2EuAAI.png" alt="0695b00000cg2EuAAI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am expecting to see is a table like below:&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="0695b00000cg2FTAAY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154792i43AC1DF906026F7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2FTAAY.png" alt="0695b00000cg2FTAAY.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if I've made no sense but I am not that knowledgeable in this area and struggling to understand what I do to get the data I want extracted.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:09:32 GMT</pubDate>
    <dc:creator>welshsteve</dc:creator>
    <dc:date>2024-11-15T22:09:32Z</dc:date>
    <item>
      <title>Struggling to extract API response to table format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Struggling-to-extract-API-response-to-table-format/m-p/2344714#M112326</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to split out a response from tRESTClient into table format using tExtractJSONFields, but am not getting anything in the results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the config of my &lt;/P&gt;&lt;P&gt;tExtractJSONFields component.&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="0695b00000cg2EfAAI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155768i61BBD7D397AB9FD4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2EfAAI.png" alt="0695b00000cg2EfAAI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what the tRESTClient response looks like in its raw format.&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="0695b00000cg2FOAAY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151823iCC41BA52AB552120/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2FOAAY.png" alt="0695b00000cg2FOAAY.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is the result of running the job. As you can see I have NULL it both columns.&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="0695b00000cg2EuAAI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148943i00A7B29C684202CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2EuAAI.png" alt="0695b00000cg2EuAAI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am expecting to see is a table like below:&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="0695b00000cg2FTAAY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154792i43AC1DF906026F7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000cg2FTAAY.png" alt="0695b00000cg2FTAAY.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if I've made no sense but I am not that knowledgeable in this area and struggling to understand what I do to get the data I want extracted.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:09:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Struggling-to-extract-API-response-to-table-format/m-p/2344714#M112326</guid>
      <dc:creator>welshsteve</dc:creator>
      <dc:date>2024-11-15T22:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Struggling to extract API response to table format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Struggling-to-extract-API-response-to-table-format/m-p/2344715#M112327</link>
      <description>&lt;P&gt;What you are trying to do is not possible here. The tExtractJSONFields returns a row of data for every iteration of the loop specified. These loops are JSON arrays. Since you are not pointing to an array in the loop parameter, you will get one row back. The paths you have specified to get the type and subtype are pointing to an array that doesn't exist. They are two arrays within an object. What you can do is extract the full of contents of each array and then produce the table you require afterwards. You would extract all of the "Sales" array in one go and all of the "Customer Service" array in one go. Then break that data down knowing that everything in the "Sales" array is type "Sales" and everything in the "Customer Service" array is type "Customer Service".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way of doing this is to use two tExtractJSONFields components and set the loop array to be "$.choice_category_dependence.Sales[*]" in one and "$.choice_category_dependence.['Customer Service'][*]" in the other. You could have only one output (for the array values) and that path would be "$".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice the the difference between the loop paths....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"$.choice_category_dependence.Sales[*]"&lt;/P&gt;&lt;P&gt;"$.choice_category_dependence.['Customer Service'][*]" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second style is used because there is a space in the element name. So you add square brackets and single quotes so that JSONPath queries can be used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 11:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Struggling-to-extract-API-response-to-table-format/m-p/2344715#M112327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-30T11:37:09Z</dc:date>
    </item>
  </channel>
</rss>

