<?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 parse an input round robin into multiple outputs in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261635#M42362</link>
    <description>You can create three tMap outputs with the condition: rowX.id % 3 == 0&lt;BR /&gt;...1&lt;BR /&gt;...2&lt;BR /&gt;And send each output to a separate file</description>
    <pubDate>Thu, 08 Jun 2017 00:57:26 GMT</pubDate>
    <dc:creator>cterenzi</dc:creator>
    <dc:date>2017-06-08T00:57:26Z</dc:date>
    <item>
      <title>How to parse an input round robin into multiple outputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261634#M42361</link>
      <description>&lt;P&gt;I am trying to load an input file into Redshift and I want to split the file round robin before loading it into Redshift to make use of the computational power of multiple slices in my cluster. How do I split an input into n number of outputs in a round robin fashion using Talend?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Ex:&lt;/P&gt; 
&lt;P&gt;Input:&lt;/P&gt; 
&lt;P&gt;id &amp;nbsp; &amp;nbsp; name&lt;/P&gt; 
&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp;Jon&lt;/P&gt; 
&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp;Anne&lt;/P&gt; 
&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp;Cole&lt;/P&gt; 
&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp;Zack&lt;/P&gt; 
&lt;P&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp;Ellen&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Output:&lt;/P&gt; 
&lt;P&gt;Main1&lt;/P&gt; 
&lt;P&gt;1 &amp;nbsp; &amp;nbsp; Jon&lt;/P&gt; 
&lt;P&gt;4 &amp;nbsp; &amp;nbsp; Zack&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Main2&lt;/P&gt; 
&lt;P&gt;2 &amp;nbsp; &amp;nbsp;Anne&lt;/P&gt; 
&lt;P&gt;5 &amp;nbsp; &amp;nbsp;Ellen&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Main 3&lt;/P&gt; 
&lt;P&gt;3 &amp;nbsp; &amp;nbsp;Cole&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 21:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261634#M42361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-07T21:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse an input round robin into multiple outputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261635#M42362</link>
      <description>You can create three tMap outputs with the condition: rowX.id % 3 == 0&lt;BR /&gt;...1&lt;BR /&gt;...2&lt;BR /&gt;And send each output to a separate file</description>
      <pubDate>Thu, 08 Jun 2017 00:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261635#M42362</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-06-08T00:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse an input round robin into multiple outputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261636#M42363</link>
      <description>&lt;P&gt;Thank you for the reply. I thought about doing that, but I actually need 6 outputs (I put down 3 in my question to simplify the problem). So with this method rowX.id % 3 = 0 and&amp;nbsp;&lt;SPAN&gt;rowX.id % 2 = 0 and&amp;nbsp;rowX.id % 6 = 0 when the id is divisible&amp;nbsp;by 6. I can't think of a simple filter to be able to split it 6 ways.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 01:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261636#M42363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-08T01:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse an input round robin into multiple outputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261637#M42364</link>
      <description>You can create six outputs and change the expression to mod 6. 
&lt;BR /&gt; 
&lt;BR /&gt;Alternately, I think you can set a row limit on tFileDelimited, and it will split the file into chunks of that size. To get a consistent number of files, you'd need to get a record count and divide that by the number of files you want. I can't test right now, but I'd assume it would use the sort order of the data flow, so that wouldn't get you a round robin of IDs unless you added the modulo expression as a new column and then sorted by that (and secondarily by the id).</description>
      <pubDate>Thu, 08 Jun 2017 01:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-an-input-round-robin-into-multiple-outputs/m-p/2261637#M42364</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-06-08T01:25:04Z</dc:date>
    </item>
  </channel>
</rss>

