<?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: Duplicate in rows in the output row in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315231#M85913</link>
    <description>&lt;P&gt;Thanks everybody for your help.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've impleted the fdenis's solution :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;tFlowToIterate&amp;nbsp;-&amp;gt; tLoop -&amp;gt; tIterateToFlow&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;with in the tLoop , input.numberinto the "To" field&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;It's work well and the entries with (input.number == 0) are abandoned.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Great thanks to rhall_2_0 for your &lt;SPAN&gt;exhaustive explanation. &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Yo&lt;/SPAN&gt;ur solution seems more smart and with less components; I will try it later.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 11:06:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-26T11:06:39Z</dc:date>
    <item>
      <title>Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315225#M85907</link>
      <description>&lt;P&gt;Hi everybody.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've got an entry flow, and I have to deplicate some rows.&lt;/P&gt; 
&lt;P&gt;More precisely, in my input there is a field that specified how many time I have to duplicate the row.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For exemple, my input is:&lt;/P&gt; 
&lt;P&gt;product;number&lt;/P&gt; 
&lt;P&gt;book;2&lt;/P&gt; 
&lt;P&gt;coat;0&lt;/P&gt; 
&lt;P&gt;plate;3&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My output needs to be:&lt;/P&gt; 
&lt;P&gt;product&lt;/P&gt; 
&lt;P&gt;book&lt;/P&gt; 
&lt;P&gt;book&lt;/P&gt; 
&lt;P&gt;plate&lt;/P&gt; 
&lt;P&gt;plate&lt;/P&gt; 
&lt;P&gt;plate&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Does anyone have any thought ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 09:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315225#M85907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-26T09:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315226#M85908</link>
      <description>select the max number (maybe you know it)
&lt;BR /&gt;create a temp table like
&lt;BR /&gt;1
&lt;BR /&gt;2
&lt;BR /&gt;2
&lt;BR /&gt;3
&lt;BR /&gt;3
&lt;BR /&gt;3
&lt;BR /&gt;4
&lt;BR /&gt;4
&lt;BR /&gt;4
&lt;BR /&gt;4
&lt;BR /&gt;and use tmap to join use "all row"
&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jun 2018 09:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315226#M85908</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-26T09:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315227#M85909</link>
      <description>&lt;BR /&gt;you can create an empty file,&lt;BR /&gt;use flowtoiterate and a tloop to add ntime the same data to the previous file.</description>
      <pubDate>Tue, 26 Jun 2018 09:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315227#M85909</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-26T09:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315228#M85910</link>
      <description>take the max number or you may know it . Create a table or a fil containing:
&lt;BR /&gt;122333444455555666666.....
&lt;BR /&gt;and use a tmap to join using "all match"</description>
      <pubDate>Tue, 26 Jun 2018 09:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315228#M85910</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-26T09:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315229#M85911</link>
      <description>&lt;P&gt;Forget this post, other screen captures have been&amp;nbsp;lost&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyFf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151586iDE41F4A0E03859F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyFf.png" alt="0683p000009LyFf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 10:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315229#M85911</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-26T10:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315230#M85912</link>
      <description>&lt;P&gt;1) Join your data as the Main flow to a tMap.&lt;/P&gt; 
&lt;P&gt;2) As the Lookup, join a tJavaFlex with a single int column ("number")&lt;/P&gt; 
&lt;P&gt;3) Inside the tMap, join the "number" column on your Main to the "number" column on your Lookup. Set the "Lookup Model" to "Reload at Each Row", the "Match Model" to "All Matches" and the "Join Model" to "Inner Join".&lt;/P&gt; 
&lt;P&gt;4) You will see a "globalMap Key" section appear. Click the green plus symbol and call the "globalMap Key" "count" and link your "number" column from your Main row to it.&lt;/P&gt; 
&lt;P&gt;5) Create an output table and link your "Product" record.&lt;/P&gt; 
&lt;P&gt;6) In your tJavaFlex (assuming you have already created your "number" column, add the following code to the Start Code.....&lt;/P&gt; 
&lt;PRE&gt;// start part of your Java code
int count = ((Integer)globalMap.get("count"));

for(int i = 0; i&amp;lt;count; i++){&lt;/PRE&gt; 
&lt;P&gt;7) Add this to your Main Code....&lt;/P&gt; 
&lt;PRE&gt;row18.number = count;&lt;/PRE&gt; 
&lt;P&gt;Note: row18 is just in my example. Yours will have to match the row name coming out of the tJavaFlex&lt;/P&gt; 
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Add this to your End Code....&lt;/P&gt; 
&lt;PRE&gt;}&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your job will look like this (I'm using a tFixedFlowInput to simplify my example)....&lt;/P&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="Job124.png" style="width: 473px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyFk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134995i00F14C248B99B81E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyFk.png" alt="0683p000009LyFk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your tMap will something like this......&lt;/P&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="tmap123.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly8k.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144472iCCEC1A2C293B25A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly8k.png" alt="0683p000009Ly8k.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;When you run this, the row will be multiplied by the number supplied on it. If the number is 0, then no row will be output.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 10:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315230#M85912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-26T10:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315231#M85913</link>
      <description>&lt;P&gt;Thanks everybody for your help.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've impleted the fdenis's solution :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;tFlowToIterate&amp;nbsp;-&amp;gt; tLoop -&amp;gt; tIterateToFlow&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;with in the tLoop , input.numberinto the "To" field&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;It's work well and the entries with (input.number == 0) are abandoned.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Great thanks to rhall_2_0 for your &lt;SPAN&gt;exhaustive explanation. &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Yo&lt;/SPAN&gt;ur solution seems more smart and with less components; I will try it later.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315231#M85913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-26T11:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate in rows in the output row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315232#M85914</link>
      <description>I've impleted this solution : 
&lt;BR /&gt; 
&lt;BR /&gt;tFlowToIterate -&amp;gt; tLoop -&amp;gt; tIterateToFlow 
&lt;BR /&gt; 
&lt;BR /&gt;with in the tLoop , input.numberinto the "To" field 
&lt;BR /&gt; 
&lt;BR /&gt;It's work well and the entries with (input.number == 0) are abandoned.</description>
      <pubDate>Tue, 26 Jun 2018 11:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Duplicate-in-rows-in-the-output-row/m-p/2315232#M85914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-26T11:07:23Z</dc:date>
    </item>
  </channel>
</rss>

