<?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: Create new file using loop in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314873#M85598</link>
    <description>&lt;P&gt;Many thanks to you Shong for providing an example as well.&lt;/P&gt;&lt;P&gt;I will try to out the components suggested and get back soon. &lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 14:14:35 GMT</pubDate>
    <dc:creator>gfoo-009</dc:creator>
    <dc:date>2022-07-27T14:14:35Z</dc:date>
    <item>
      <title>Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314870#M85595</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create new records on new file from a given input file using Talend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody got any ideas how this can be achieved using talend component like loop or&lt;/P&gt;&lt;P&gt;others ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to read the input file with 3 rows and depending on the qty on &lt;/P&gt;&lt;P&gt;each row ,populate the x number of lines as indicated by the quantity on each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example first row has qty 5 will produce 5 lines of same record with qty 1 .&lt;/P&gt;&lt;P&gt;and 2nd row with 3 lines ....3rd row with 1 line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example input file test.csv with 3 rows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000StErLAAV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152317iA1A84BE489DB8792/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000StErLAAV.png" alt="0695b00000StErLAAV.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;testout1.csv &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000StErVAAV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145957iEB5EB1D610A2B663/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000StErVAAV.png" alt="0695b00000StErVAAV.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward for some ideas .&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:42:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314870#M85595</guid>
      <dc:creator>gfoo-009</dc:creator>
      <dc:date>2024-11-15T22:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314871#M85596</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Iterate the source data row by row and use a tLoop component to do the loop, generate qty rows of the same data. Here is an example Job.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000StFKhAAN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141260i27936F3E38BCDFCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000StFKhAAN.png" alt="0695b00000StFKhAAN.png" /&gt;&lt;/span&gt;​&lt;/P&gt;&lt;P&gt;tFixedFlowInput_2 has the same schema as source data （tFixedFlowInput_1 in this case）, it generates the current row of data.&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000StFKcAAN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140353iCB7D927EFCE252D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000StFKcAAN.png" alt="0695b00000StFKcAAN.png" /&gt;&lt;/span&gt;tUnite: merge all the rows before they are written into file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try and let me know if you have any questions.&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, 27 Jul 2022 08:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314871#M85596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-27T08:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314872#M85597</link>
      <description>&lt;P&gt;&amp;nbsp;Thanks for the information, I will try to figure it out for more. Keep sharing such informative post keep suggesting such post.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 11:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314872#M85597</guid>
      <dc:creator>Daniel044</dc:creator>
      <dc:date>2022-07-27T11:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314873#M85598</link>
      <description>&lt;P&gt;Many thanks to you Shong for providing an example as well.&lt;/P&gt;&lt;P&gt;I will try to out the components suggested and get back soon. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314873#M85598</guid>
      <dc:creator>gfoo-009</dc:creator>
      <dc:date>2022-07-27T14:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314874#M85599</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000StM0AAAV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158163iF92017DA17D790BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000StM0AAAV.png" alt="0695b00000StM0AAAV.png" /&gt;&lt;/span&gt;Hi Shong, if I use  tFileInputDelimited_1 instead of  tFixedflowinput as there can be hundreds of records or rows to process. Do I still need tloop? &lt;/P&gt;&lt;P&gt;I need to be able increment the count as iteration is being done on first loop:-&lt;/P&gt;&lt;P&gt; Pseudo codes will be like:-&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;     for each wf-det :&lt;/P&gt;&lt;P&gt;           do I =1 to wf-det.wf-qty  :&lt;/P&gt;&lt;P&gt;           create wf-det2.&lt;/P&gt;&lt;P&gt;               cnt = cnt + 1&lt;/P&gt;&lt;P&gt;               wf-det2.wf-seq = cnt&lt;/P&gt;&lt;P&gt;               Wf-det2.wf-prod2id                  =  wf-det.wf-prod2id&lt;/P&gt;&lt;P&gt;               .....&lt;/P&gt;&lt;P&gt;               .....&lt;/P&gt;&lt;P&gt;           end.&lt;/P&gt;&lt;P&gt;  end.&lt;/P&gt;&lt;P&gt;  Will the above components achieve the intended output i.e&lt;/P&gt;&lt;P&gt;  On processing first row of input file,&lt;/P&gt;&lt;P&gt;   5 line items will be created ..then 3 line and then 1 line.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 05:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314874#M85599</guid>
      <dc:creator>gfoo-009</dc:creator>
      <dc:date>2022-07-28T05:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create new file using loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314875#M85600</link>
      <description>&lt;P&gt;tFileInputDelimited or tFixedFlowInput are both input component that read data from data source,  tloop is used to duplicate the same row multiple times based on the qty value. From your example data, qty value is read from the source data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 08:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-new-file-using-loop/m-p/2314875#M85600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-28T08:30:40Z</dc:date>
    </item>
  </channel>
</rss>

