<?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: Loop within a loop in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294399#M67285</link>
    <description>&lt;P&gt;Ok so this can't be done in one job. Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 12:35:39 GMT</pubDate>
    <dc:creator>MattE</dc:creator>
    <dc:date>2022-03-29T12:35:39Z</dc:date>
    <item>
      <title>Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294394#M67280</link>
      <description>&lt;P&gt;Hi, i have the requirement where i have to build and execute a number of tREST API calls, the calls are built dynamically in SQL and the number of them could change. However, the API I'm using also uses pagination so for each API call i also have to loop and call it multiple times incrementing the page number until there are no results left. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the scenario is &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Build call &lt;A href="https://www.apicall1.com" alt="https://www.apicall1.com" target="_blank"&gt;www.apicall1.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;call page 1 &lt;A href="https://www.apicall1.com" alt="https://www.apicall1.com" target="_blank"&gt;www.apicall1.com&lt;/A&gt;&amp;amp;page1&lt;/P&gt;&lt;P&gt;call page 2 &lt;A href="https://www.apicall1.com" alt="https://www.apicall1.com" target="_blank"&gt;www.apicall1.com&lt;/A&gt;&amp;amp;page2&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;Build call &lt;A href="https://www.apicall2.com" alt="https://www.apicall2.com" target="_blank"&gt;www.apicall2.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;call page 1 &lt;A href="https://www.apicall2.com" alt="https://www.apicall2.com" target="_blank"&gt;www.apicall2.com&lt;/A&gt;&amp;amp;page1&lt;/P&gt;&lt;P&gt;call page 2 &lt;A href="https://www.apicall2.com" alt="https://www.apicall2.com" target="_blank"&gt;www.apicall2.com&lt;/A&gt;&amp;amp;page2&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure a way to do this with Talend Studio's components as tLoop has to be a start component but i essentially have to start a tLoop for each call. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any one any ideas without resorting to Java as i'd like to make this easier to support with native Talend components?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached is what I've tried but because tLoop is part of the subjob it is only called once which is not the behaviour i need. &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294394#M67280</guid>
      <dc:creator>MattE</dc:creator>
      <dc:date>2024-11-15T23:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294395#M67281</link>
      <description>&lt;P&gt;Hi does the first call return the number of page ?&lt;/P&gt;&lt;P&gt;if yes you could do something like this :&lt;/P&gt;&lt;P&gt;first call send the value of page to a globalVar&lt;/P&gt;&lt;P&gt;then use a tRowgenerator with one field :&lt;/P&gt;&lt;P&gt;name "pageNumber"&lt;/P&gt;&lt;P&gt;as  type String&lt;/P&gt;&lt;P&gt; value : String.valueOf(Numeric.sequence("s1",1,1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the row number field you call your globalMap : &lt;/P&gt;&lt;P&gt;you rely this to a tflowToiterate then you iterate on your tRest component for the loop call &lt;/P&gt;&lt;P&gt;and in the url you add the globalvar (String)globalMap.get("row1.pageNumber")&lt;/P&gt;&lt;P&gt;here row1 is the row linked to the tFlowToIterate&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 09:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294395#M67281</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-03-29T09:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294396#M67282</link>
      <description>&lt;P&gt;Hi @guenneguez jeremy​&amp;nbsp; thanks that would work for the pagination on one call but the issue is that once i have looped through the pages of that first call i then need to build and loop a second and maybe 3rd of 4th call and loop through their pages as well. Essentially there would be an outer loop which is where my issue lies. The ultimate goal is to combine all these into a single file. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 09:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294396#M67282</guid>
      <dc:creator>MattE</dc:creator>
      <dc:date>2022-03-29T09:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294397#M67283</link>
      <description>&lt;P&gt;maybe try to separate loop in distinct job for a clearer vision&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 09:47:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294397#M67283</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-03-29T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294398#M67284</link>
      <description>&lt;P&gt;yes, I agree with @guenneguez jeremy​&amp;nbsp;, loop different API calls in the main job, and do the page loop for current API in child job. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 10:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294398#M67284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-29T10:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294399#M67285</link>
      <description>&lt;P&gt;Ok so this can't be done in one job. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 12:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294399#M67285</guid>
      <dc:creator>MattE</dc:creator>
      <dc:date>2022-03-29T12:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Loop within a loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294400#M67286</link>
      <description>&lt;P&gt;it can be done in one job , but definitively i suggest you to partition this in smaller jobs to keep control of each part.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 12:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-within-a-loop/m-p/2294400#M67286</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-03-29T12:52:17Z</dc:date>
    </item>
  </channel>
</rss>

