<?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: Iterate ID for get other informations in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2423968#M140235</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure the global variable&amp;nbsp;&lt;SPAN&gt;(String)globalMap.get("row1.userUID") has value, print its value before it is used on tJava. To test if the URL works, type in a fixed value in the url, eg: "...&lt;EM&gt;yyyyyyy&lt;/EM&gt;.json?uid=balabala", if it works, then change the url to use global variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 09:29:00 GMT</pubDate>
    <dc:creator>Shicong_Hong</dc:creator>
    <dc:date>2024-02-27T09:29:00Z</dc:date>
    <item>
      <title>Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2422240#M140209</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I know there are many questions like this in the forum, but I can't find a solution even by reading them. I'm new to Talend and I want to retrieve the values of the "id" and "userUID" fields from a list of accounts via an API call.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I'm using tRestClient and tExtractJSONFields and it works well. Now I need to iterate the "userUID" for get the details of all the accounts toghether, and I'm not able.&lt;/P&gt;
&lt;P&gt;I used tFlowTolterate after the tExtractJSONFields but I'm not sure about the next steps. I saw someone using a tSetGlobalVar but I'm not sure it's the right way to reach the goal.&lt;/P&gt;
&lt;P&gt;Anyone can help me?&lt;/P&gt;
&lt;P&gt;The calls structure are:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[
    {
        "fullname": "xxxx",
        "created_at": "2023-07-19T15:39:33+02:00",
        "id": "64b7e795e39ee10dd656582622d",
        "userUID": 54661010
    },
    {
        "fullname": "yyy",
        "created_at": "2023-07-19T15:39:33+02:00",
        "id": "64b7e79yyyye10dd656582622d",
        "userUID": 54667860
    }
]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;{
    "count": 3,
    "addresses": [
        {
            "id": "65c0f1b75fb8e049f7dcd5dc",
            "fullname": "xxxx",
            "address": "Via skjhdf",
            "hidden": false
        },
        {
            "id": "65c9d7465fb8e004ac2ccdad",
            "fullname": "xxxx",
            "address": "Via aretrtrdh",
            "hidden": false
        },
                {
            "id": "65c9d7465fb8e004ac2ccdad",
            "fullname": "xxxx",
            "address": "Via ajdhdthdhh",
            "hidden": false
        }
    ]
}
&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 11:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2422240#M140209</guid>
      <dc:creator>dura45</dc:creator>
      <dc:date>2024-02-22T11:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2422426#M140211</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As tRestClient doesn't accept 'Iterate' connector, add a tJava between tFlowToIterate and tRestClient, link tRestClient with 'OnComponentOK' from tJava.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...tExtractJsonField--main(row1)--tFlowToIterate--iterate--tJava--oncomponentok--tRestClient_2&lt;/P&gt;
&lt;P&gt;on tRestCient_2, you can access the current 'id' or 'userUID' value with expression:&lt;/P&gt;
&lt;P&gt;(String)globalMap.get("row1.id")&lt;/P&gt;
&lt;P&gt;(String)globalMap.get("row1.userUID")&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shicong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 15:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2422426#M140211</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-02-22T15:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2423917#M140233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;and thank you for your reply. The schema now is:&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Schema.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160708iF79ADD4029A9A82E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Schema.png" alt="Schema.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I changed the schema because before all I load the data in a SQL Server table. Inside I have all the informations: id, userUID and others.&lt;/P&gt;
&lt;P&gt;If I run the job I receive this error message:&amp;nbsp;&lt;EM&gt;Exception in component tRESTClient_1 (GetShipmentDetails)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;javax.ws.rs.BadRequestException: HTTP 400 Bad Request&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The url of the tRestClient_1 is:&amp;nbsp;"&lt;EM&gt;yyyyyyy&lt;/EM&gt;.json?uid="+(String)globalMap.get("row1.userUID") but I'm sure it's wrong.&lt;/P&gt;
&lt;P&gt;The other strange thing is that if I put a tLogRow after tJava_1 I get only so many in response:&lt;/P&gt;
&lt;P&gt;I&lt;BR /&gt;I&lt;BR /&gt;I&lt;BR /&gt;I&lt;BR /&gt;...&lt;/P&gt;
&lt;P&gt;As if in fact the interaction is not going well.&lt;/P&gt;
&lt;P&gt;What you can suggest me?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 08:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2423917#M140233</guid>
      <dc:creator>dura45</dc:creator>
      <dc:date>2024-02-27T08:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2423968#M140235</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure the global variable&amp;nbsp;&lt;SPAN&gt;(String)globalMap.get("row1.userUID") has value, print its value before it is used on tJava. To test if the URL works, type in a fixed value in the url, eg: "...&lt;EM&gt;yyyyyyy&lt;/EM&gt;.json?uid=balabala", if it works, then change the url to use global variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 09:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2423968#M140235</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-02-27T09:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2424326#M140253</link>
      <description>&lt;P&gt;The tJava component is only a helper construct to be able to trigger a component (which does not accept an Iterate trigger input) based on an Iterate trigger. The tJava has nothing to do and will not do anything. The only reason to add it is to convert an Iterate trigger into a OnComponentOk trigger wich is accepted by the tRESTClient component.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually I mostly use this construct because it has the additional advantage of separating the flows.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 21:55:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2424326#M140253</guid>
      <dc:creator>jlolling</dc:creator>
      <dc:date>2024-02-27T21:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate ID for get other informations</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2424328#M140254</link>
      <description>&lt;P&gt;If you get empty values in your list, then your settings for the Json parsing are wrong.&lt;/P&gt;
&lt;P&gt;I would print the response to get an exact knowledge about the document structure.&lt;/P&gt;
&lt;P&gt;Please check also of you use the string output type of the tRestClient.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 21:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-ID-for-get-other-informations/m-p/2424328#M140254</guid>
      <dc:creator>jlolling</dc:creator>
      <dc:date>2024-02-27T21:58:43Z</dc:date>
    </item>
  </channel>
</rss>

