<?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 Re: Use a REST/JSON API from Talend ETL for the first time in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334525#M103178</link>
    <description>&lt;P&gt;The error seems to be link to this line of code&lt;/P&gt;&lt;P&gt;"row2.statusCode = webClientResponseStatus_tRESTClient_1;"&lt;/P&gt;&lt;P&gt;with associated message : StatusCode cannot be resolved or is not a field&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2019 10:46:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-26T10:46:35Z</dc:date>
    <item>
      <title>Use a REST/JSON API from Talend ETL for the first time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334524#M103177</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying ti use an API for the first time.&lt;/P&gt;&lt;P&gt;I have choosen a simple one and that seems public/open :&amp;nbsp;&lt;A href="http://restcountries.eu/" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;http://restcountries.eu/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's a list of countries with a lot of information&amp;nbsp;&lt;A href="https://restcountries.eu/rest/v2/all" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://restcountries.eu/rest/v2/all&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Talend 7.1 I designed a job with a tRestClient and then tExtractJSONfields ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See all attachements.&lt;/P&gt;&lt;P&gt;When I run the job, I have compilation error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 09:51:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334524#M103177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T09:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use a REST/JSON API from Talend ETL for the first time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334525#M103178</link>
      <description>&lt;P&gt;The error seems to be link to this line of code&lt;/P&gt;&lt;P&gt;"row2.statusCode = webClientResponseStatus_tRESTClient_1;"&lt;/P&gt;&lt;P&gt;with associated message : StatusCode cannot be resolved or is not a field&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 10:46:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334525#M103178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T10:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use a REST/JSON API from Talend ETL for the first time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334526#M103179</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006yr8WAAQ"&gt;@DamienBlondel&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have written a quick job to show you how to do this. I won't attach it as I think I am probably using a different version to you. But I will show you the screenshots for you to copy.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;First of all, your job does not need to start with a tWarn. You can start it with the tRestClient component. You can see my job below...&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-05-26 at 10.52.13.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4gQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147534i787B0ABDD1B74B29/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4gQ.png" alt="0683p000009M4gQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When configuring the tRestClient, you were nearly there. But you need to remember to switch off the "Convert the response to DOM Document". This will wrap your JSON in an XML file.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-05-26 at 10.52.25.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4sB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148990iD58C1F99AEEF70EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4sB.png" alt="0683p000009M4sB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;I believe the above is the same as yours. The Advanced Settings is where you need to make your changes....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-05-26 at 10.52.36.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M57T.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146678i3E0BFFD9ACF0918C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M57T.png" alt="0683p000009M57T.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The last bit is the tExtractJSONFields component. The JSON you get from this API returns an array. So your loop needs to iterate over that array. I used this "$.[*]". This will allow you to focus on the components inside the array. Once you have that, you simply set JSONPaths to the components you want. I chose "name" ("$.name") and "alpha2Code" ("$.alpha2Code"). Notice that I chose "string" as the "JSON field". This is the column you need to use when dealing with JSON.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-05-26 at 10.52.49.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M57d.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130361i1AE28E318C04EF60/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M57d.png" alt="0683p000009M57d.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;After this, I simply added a tLogRow which prints the output to the output window.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 11:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334526#M103179</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T11:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use a REST/JSON API from Talend ETL for the first time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334527#M103180</link>
      <description>&lt;P&gt;Thank you for your help ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to update my initial job but it didn't work ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I restarted from scratch following your exemple and it works !!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell what is the role of the tlogRow in between the 2 main components ?&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 12:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334527#M103180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T12:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use a REST/JSON API from Talend ETL for the first time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334528#M103181</link>
      <description>&lt;P&gt;The tLogRow is a useful component for printing the values of the rows in the output window. However, you do not always want to have these switched on. It is useful to add tLogRows when developing and testing, but deactivate them when you no longer need them. This will not affect the flow of data. However, deactivating other components will affect the flow of data, so this technique is only for the tLogRow.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 18:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-a-REST-JSON-API-from-Talend-ETL-for-the-first-time/m-p/2334528#M103181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T18:27:50Z</dc:date>
    </item>
  </channel>
</rss>

