<?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: How to Batch 100 calls through tXMLMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227063#M18787</link>
    <description>&lt;P&gt;I suspect that your globalMap values are null. There is a SQL error which shows this (in red).&lt;/P&gt;</description>
    <pubDate>Thu, 13 Dec 2018 23:03:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-12-13T23:03:53Z</dc:date>
    <item>
      <title>How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227057#M18781</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1dC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152271i58ADBF37D528CDF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1dC.png" alt="0683p000009M1dC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have the above Job which will pick up more than 1000 rows from the database every night, the Soap service only accept 100 rows at a time, how should I perform this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your help is appreciated.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227057#M18781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T07:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227058#M18782</link>
      <description>&lt;P&gt;The easiest way to do this is to work out how you can limit your DB query to 100 rows of data. You might have an ID or a key somewhere else in the data set. You need to work out what you will use then add a new DB component before your Main DB component. Use this new DB component to simply return your Key values. So, for example, if your key is an Id and the ids are like below....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....and you want to only return records in sets of 2, you could set your new query to simply return a 'from' and 'to' value using a query similar to this (pseudo code based on SQL Server)....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; select 
 ID-ID%2 as 'from',
 ID-(ID-1)%2 as 'to'
 from MyTable
 where ID%2=1&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;This will return something like below....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From To&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then connect your new DB component to a tFlowToIterate component and this to your Main DB component. All you need to do then is use the 'to' and 'from' values (stored in the globalMap) in the WHERE clause of your Main query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What will happen is that your Main query will be run for every row returned by the query used to return your key (grouping) data. This will mean that the tXMLMap code will be run for each of these key sets.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:56:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227058#M18782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T17:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227059#M18783</link>
      <description>&lt;P&gt;I'll try your approach and will let you know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 18:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227059#M18783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T18:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227060#M18784</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, there is no way to group the data I have in a sequential order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way I can do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 22:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227060#M18784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T22:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227061#M18785</link>
      <description>&lt;P&gt;You need to group the data to do this. There is always a way to group data in SQL. Have you tried using a With Clause to construct a data structure with an id field?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 22:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227061#M18785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T22:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227062#M18786</link>
      <description>&lt;P&gt;I think I'm doing a good progress, I'm getting a null exception, I have the below in my where clause, is it correct to use FirstIndex and SecondIndex in my Where clause?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT ROW_NUMBER() OVER (ORDER BY PRSN_ID) AS ROW_NUM, WORK_EMAIL, PRSN_ID, FIRST_NAME, LAST_NAME&lt;BR /&gt;FROM MYREPORTS.MYTABLE&lt;BR /&gt;WHERE ACTIVE_EM&amp;nbsp;= 'Y'&lt;BR /&gt;AND DATE_TS &amp;gt; TIMESTAMP '2018-12-03 03:11:13.000000'&lt;/P&gt; 
&lt;P&gt;QUALIFY ROW_NUM &amp;gt;= " + (String)globalMap.get("FirstIndex") + " AND ROW_NUM &amp;lt;=&amp;nbsp; " + (String)globalMap.get("SecondIndex")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is the first query result:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 249px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0ms.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153110i41A2D66C33DC6265/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0ms.png" alt="0683p000009M0ms.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1fc.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148046i73C804F00E320C29/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1fc.png" alt="0683p000009M1fc.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 918px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1fh.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133614iCC900833D05F3127/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1fh.png" alt="0683p000009M1fh.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 22:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227062#M18786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-13T22:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227063#M18787</link>
      <description>&lt;P&gt;I suspect that your globalMap values are null. There is a SQL error which shows this (in red).&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 23:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227063#M18787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-13T23:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227064#M18788</link>
      <description>&lt;P&gt;Awesome it works now, it was null-ing because I didn't point the From and To column values to the key element in the tFlowToIterate component below on the screenshot&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now excuse my Math poor skills I'm trying to get this working with 1000 batch elements, how is it going to be?&lt;/P&gt; 
&lt;P&gt;Appreciate your help!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;select 
 ID-ID%2 as 'from',
 ID-(ID-1)%2 as 'to'
 from MyTable
 where ID%2=1&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 744px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1i7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138195i6BE6A4673F09E32B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1i7.png" alt="0683p000009M1i7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 22:47:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227064#M18788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-14T22:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227065#M18789</link>
      <description>&lt;P&gt;You could try with this relatively simple way of achieving this. The query below will need to be tailored to your table, but it should work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; With multsOf1000 as (
 select 
 ID-999 'from_id',
 ID 'to_id'
 from MyTable
 where ID%1000=0
 ),

 remainder as (
	Select max(multsOf1000.to_id)+1 'from_id',
	max(batch.id) 'to_id'
	From multsOf1000, MyTable
 )

 select *
 from (
 select * 
 from multsOf1000
 
 UNION ALL

  select * 
 from remainder) tmp
 order by tmp.from_id&lt;/PRE&gt;&lt;P&gt;I can't guarantee that this will be super efficient, but essentially it is returning the multiples of 1000 in the first section. Then it is adding on the remainder record (the records after the last multiple of 1000). You may need to tweak this, but it should give you an idea of how to achieve this sort of thing. I am sure there are much better ways of achieving this, but this was the first that came to mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 17:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227065#M18789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-16T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Batch 100 calls through tXMLMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227066#M18790</link>
      <description>&lt;P&gt;In Teradata I tried the below query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&lt;SPAN class="kwd"&gt;WITH&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; ID&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ROW_NUM&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;AS&lt;/SPAN&gt; 
&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; ROW_NUMBER&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;()&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;OVER&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;BY&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; PRSN_ID&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;AS&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; ROW_NUM
    &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; MyTable 
    &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; ACTIVE_IND &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="str"&gt;'Y'&lt;/SPAN&gt; 
    &lt;SPAN class="kwd"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;BY&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; PRSN_ID&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt; 
&lt;PRE&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt; 
   &lt;SPAN&gt;CASE&lt;/SPAN&gt; &lt;SPAN&gt;WHEN&lt;/SPAN&gt; &lt;SPAN&gt;ROW_NUM&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt; &lt;SPAN&gt;THEN&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt; &lt;SPAN&gt;ELSE&lt;/SPAN&gt; &lt;SPAN&gt;SecondIndex&lt;/SPAN&gt;&lt;SPAN&gt;-999&lt;/SPAN&gt; &lt;SPAN&gt;END&lt;/SPAN&gt; &lt;SPAN&gt;AS&lt;/SPAN&gt; &lt;SPAN&gt;FirstIndex&lt;/SPAN&gt;&lt;SPAN&gt;,   (&lt;/SPAN&gt;&lt;SPAN&gt;ROW_NUM&lt;/SPAN&gt;&lt;SPAN&gt;+1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;1000&lt;/SPAN&gt; &lt;SPAN&gt;AS&lt;/SPAN&gt; &lt;SPAN&gt;SecondIndex&lt;/SPAN&gt;
   &lt;SPAN&gt;FROM&lt;/SPAN&gt; &lt;SPAN&gt;ID&lt;/SPAN&gt;
   &lt;SPAN&gt;WHERE&lt;/SPAN&gt; &lt;SPAN&gt;ROW_NUM&lt;/SPAN&gt; &lt;SPAN&gt;MOD&lt;/SPAN&gt; &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/PRE&gt; 
&lt;P&gt;It's still not working well, but I'll continue looking into it.&lt;/P&gt; 
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Batch-100-calls-through-tXMLMap/m-p/2227066#M18790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-18T16:17:08Z</dc:date>
    </item>
  </channel>
</rss>

