<?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: Generate n rows of XML output in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356758#M122210</link>
    <description>So I am planning to go with your approach as it seems simpler to me 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Just one question, do you by any chance know how we can not output an XML tag that is empty?</description>
    <pubDate>Thu, 31 May 2018 15:02:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-31T15:02:28Z</dc:date>
    <item>
      <title>Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356753#M122205</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;I have read plenty of discussions on this forum that ask as to how n number of rows can be split into batches.&lt;/P&gt; 
&lt;P&gt;I am facing a very similar situation and the link provided by&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;is no longer available.&lt;/P&gt; 
&lt;P&gt;So, I am re-posting the question here again:&lt;/P&gt; 
&lt;P&gt;I have a query in tOracleInput that generates n number of rows.&lt;/P&gt; 
&lt;P&gt;The rows read are then joined with some tHashOutput components to generate XML data.&lt;/P&gt; 
&lt;P&gt;This XML data is actually a SOAP request that performs bulk operations.&lt;/P&gt; 
&lt;P&gt;However I recently found out that I have to limit the number of rows I send in a SOAP request to 1000.&lt;/P&gt; 
&lt;P&gt;Any idea how I can achieve that?&lt;/P&gt; 
&lt;P&gt;My job currently looks something like below&lt;/P&gt; 
&lt;P&gt;tOracleInput ----&amp;gt; tXMLMap ----&amp;gt; tSOAP ----&amp;gt; tExtractXMLFields ----&amp;gt; tMap ----&amp;gt; tMSSqlOutput&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^&amp;nbsp; &amp;nbsp; ^&amp;nbsp; &amp;nbsp; ^&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp;&amp;nbsp;tHashOutput3&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp;&amp;nbsp;tHashOutput2&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tHashOutput1&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 06:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356753#M122205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T06:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356754#M122206</link>
      <description>&lt;P&gt;Sometimes&lt;SPAN&gt;&amp;nbsp;best is the enemy of good.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, you may probably use a tMap instead of a tXMLMap to produce&amp;nbsp;CSV files with a number of records limited to 1000 (tFileOutputDelimited Advanced Settings).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then, on the next subjob, iterate over the list of CSV files generated by the 1rst subjob to build the expected XML and call the SOAP request for each input file.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 10:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356754#M122206</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-31T10:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356755#M122207</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;I am thinking of something similar... tMap ----&amp;gt; tAdvancedFileOutputXML and then 2nd subjob that iterated over the XML files generated and pass them on to tSOAP.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356755#M122207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T11:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356756#M122208</link>
      <description>&lt;P&gt;That's also an option but the solution with intermediate CSV files will be faster.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356756#M122208</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-31T11:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356757#M122209</link>
      <description>&lt;P&gt;The solution I posted to this (sorry, my server was attacked by Russian hackers.....according to their IP addresses and I haven't had the time to sort it yet), is as follows.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) You know that you are limited to 1000 rows of data. So write a mechanism into your initial query that lets you group the data in a maximum of 1000 records. Find a key (or add a key) to enable this. This can be composite.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) Once you have figured out the grouping mechanism in your query, add a new t{database}Input component at the beginning of your job and use that query to return just the group keys. So if you you data has 10000 rows broken into 15 groups with 3 key fields, your query will return 15 rows with your 3 key fields.&lt;/P&gt; 
&lt;P&gt;3) Connect this db component to a tFlowToIterate. This will put your key fields into the globalMap and allow you to iterate. THIS is the key step.&lt;/P&gt; 
&lt;P&gt;4) Now connect your original input db component to the iterate link. Use the globalMap values in your query's where clause. This will mean your query will only return a max of 1000 rows. The rest of the job should remain pretty much the same.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What you are doing here is essentially looping over your dataset in iterations per group or per 1000 rows in a group. What comes after the iterate link is essentially treated as its own subjob, so it allows you to limit the number of records to supplied to the xml and produces an xml document per iteration.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 12:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356757#M122209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T12:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356758#M122210</link>
      <description>So I am planning to go with your approach as it seems simpler to me 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Just one question, do you by any chance know how we can not output an XML tag that is empty?</description>
      <pubDate>Thu, 31 May 2018 15:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356758#M122210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T15:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356759#M122211</link>
      <description>&lt;P&gt;In the tXMLMap component, click on the spanner in the output table and set "Create empty element" to false.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 15:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356759#M122211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Generate n rows of XML output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356760#M122212</link>
      <description>I am using a tMap instead of tXMLMap so this option is not availalble in tMap. But yes a similar option exists in the tAdvancedOutputXML component which I am using and have enabled.</description>
      <pubDate>Fri, 01 Jun 2018 05:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-n-rows-of-XML-output/m-p/2356760#M122212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-01T05:42:51Z</dc:date>
    </item>
  </channel>
</rss>

