<?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 API calls based on count divided by pagesize in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360961#M125429</link>
    <description>&lt;P&gt;change the To expression to:&lt;/P&gt;&lt;P&gt;(Integer)globalMap.get("pageCount.value")&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 07:35:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-23T07:35:38Z</dc:date>
    <item>
      <title>Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360953#M125421</link>
      <description>&lt;P&gt;I'm looking for some help on a strategy here - I've got an API that offers pagination by using a separate endpoint to return a count of records, which you then use to calculate how many pages based on the pagesize, which is a max of 100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I'm needing to make a call to one endpoint /records/count and then take that result and divide by 100 for the page size. So if the count is 347, I need to add the page argument to the /records endpoint for each page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to take the count value from the API result and then iterate through to use it as a variable in the URL Query parameters. &lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 04:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360953#M125421</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-15T04:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360954#M125422</link>
      <description>&lt;P&gt;Made some progress on at least getting the count value, but I feel like this flow is overcomplicated:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HsRvlAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135865iDE22A454AF4C1B49/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HsRvlAAF.png" alt="0695b00000HsRvlAAF.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the result of the tREST:&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;resource&amp;gt;&amp;lt;count&amp;gt;482&amp;lt;/count&amp;gt;&amp;lt;/resource&amp;gt;|&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get having to convert the string that returns to a document with tConvert, but do I really have to ExtractXML and then XMLMap, I tried so many variations on just going from tConvert to tXML map, but I never got the value. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 01:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360954#M125422</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-16T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360955#M125423</link>
      <description>&lt;P&gt;Thanks for that info, that sounds like it would be very helpful. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However - I'm not seeing any links attached, but I'll see if I can search them out in your other posts. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 17:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360955#M125423</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-16T17:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360956#M125424</link>
      <description>&lt;P&gt;Why you convert the string result to a document? You can extract the count value from the string result  using tExtractXMLField. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 01:30:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360956#M125424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-17T01:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360957#M125425</link>
      <description>&lt;P&gt;I'm struggling to get all the schema aligned and proper, so that helps alleviate the errors I kept getting until I can better understand that setup. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I connect without the convert node, I get an error about converting an integer to a string, even though the field I'm looking at isn't an integer, or I'll get an error that body cannot be resolved or is not a field. So, basically through trial and error I found something that worked. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Between trying to get this project working, I'm going through tutorials so hopefully I'll get a better understanding of what I'm doing wrong with all the schema settings. &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;</description>
      <pubDate>Tue, 17 Aug 2021 22:36:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360957#M125425</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-17T22:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360958#M125426</link>
      <description>&lt;P&gt;So, I've got my count from the API /count endpoint&lt;/P&gt;&lt;P&gt;I've converted it to an integer so I can calculate total pages needed. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking I take the calculated value, set a global variable, then use a tLoop to iterate through? However, I'm not figuring out how to reference the global variable within the tLoop, then how in turn to increment until the total page count is done. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying this loop setup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HsvdQAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153942iAE03FC9A1A1C466E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HsvdQAAR.png" alt="0695b00000HsvdQAAR.png" /&gt;&lt;/span&gt;In this workflow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HsvdpAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146874i7D80B93492547EBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HsvdpAAB.png" alt="0695b00000HsvdpAAB.png" /&gt;&lt;/span&gt;So, the value I set in the tXMLMap_8 pageCount output is what I want to use as the variable in the loop. In this instance, pageCount is 4, and I want the loop to start at 1, and then increase until 4, and the variable I'm using in the URL would then need to be updated with each iteration. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HsvesAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138112iB97AA8ABDE21F3CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HsvesAAB.png" alt="0695b00000HsvesAAB.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the tSetGlobalVar:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HsvgKAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137461iB4B8C6990802B0B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HsvgKAAR.png" alt="0695b00000HsvgKAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 01:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360958#M125426</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-18T01:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360959#M125427</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;one quick question, is tLoop used to iterate another API call? i see one issue about getting the value of global variable for query parameter "page", the double quotes should remove.&lt;/P&gt;&lt;P&gt;(String)globalMap.get("page")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 04:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360959#M125427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-18T04:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360960#M125428</link>
      <description>&lt;P&gt;I am trying to use tLoop to take the "pageCount" variable that I'm calculating, and use that as the upper limit of the For loop. &lt;/P&gt;&lt;P&gt;I have the "pageCount" value showing in a table in a log to verify it's there:&lt;/P&gt;&lt;P&gt;.-----+---------.&lt;/P&gt;&lt;P&gt;|&amp;nbsp;tLogRow_15 &amp;nbsp;|&lt;/P&gt;&lt;P&gt;|=----+--------=|&lt;/P&gt;&lt;P&gt;|value|key&amp;nbsp;&amp;nbsp;&amp;nbsp;|&lt;/P&gt;&lt;P&gt;|=----+--------=|&lt;/P&gt;&lt;P&gt;|4&amp;nbsp;&amp;nbsp;|pageCount|&lt;/P&gt;&lt;P&gt;'-----+---------'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HthpAAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144352iC4D7AA2D7138BBF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HthpAAAR.png" alt="0695b00000HthpAAAR.png" /&gt;&lt;/span&gt;But when run the tLoop I get&lt;/P&gt;&lt;P&gt;Detail Message: The operator &amp;lt;= is undefined for the argument type(s) int, Object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Aug 2021 22:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360960#M125428</guid>
      <dc:creator>Serendipity</dc:creator>
      <dc:date>2021-08-22T22:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate API calls based on count divided by pagesize</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360961#M125429</link>
      <description>&lt;P&gt;change the To expression to:&lt;/P&gt;&lt;P&gt;(Integer)globalMap.get("pageCount.value")&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 07:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-API-calls-based-on-count-divided-by-pagesize/m-p/2360961#M125429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-23T07:35:38Z</dc:date>
    </item>
  </channel>
</rss>

