<?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 Dynamic Output Files Based on Input File in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307765#M79173</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMssAAG"&gt;@Sanket&lt;/A&gt;&amp;nbsp;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;what is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;suggest&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;will work but&lt;SPAN&gt; the &lt;/SPAN&gt;hardcoded&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;condition.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What you are looking for is dynamic which this:&lt;/P&gt; 
&lt;P&gt;tfileinputdelim-&amp;gt;tflowiterate-&amp;gt;tFIxedflowinput (create 2 fields in out schema , declare the value of fileds&amp;nbsp;as ctrl+space , values from tflowiterate variable)-&amp;gt;tFIleoutdelim (in target path use lets say , "c:/myfiles/"+"_"+&amp;lt;region variable from flowtoiterate&amp;gt;+".txt" and also check 'append box'&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;try this proven method. any question ask.&lt;/P&gt; 
&lt;P&gt;if tomorrow u will add more region no problem , solution will work.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Mar 2018 19:54:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-12T19:54:00Z</dc:date>
    <item>
      <title>Create Dynamic Output Files Based on Input File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307763#M79171</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Talend Open Studio 6.5 and exploring it for&amp;nbsp;self-learning. I want to perform following task -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an input text file with region wise sales - sample data is as below -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Region, Sales&lt;/P&gt;&lt;P&gt;West, 400&lt;/P&gt;&lt;P&gt;West, 300&lt;/P&gt;&lt;P&gt;South, 500&lt;/P&gt;&lt;P&gt;South, 700&lt;/P&gt;&lt;P&gt;North, 200&lt;/P&gt;&lt;P&gt;East, 800&lt;/P&gt;&lt;P&gt;... and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is, create multiple text files from this source data. There should be 4 output text files created. West, South, North, and East (&lt;STRONG&gt;the flow should be dynamic and if there's another region added, it should create that new region name's file&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Each text file will only contain that particular region's data. &lt;STRONG&gt;Eg. West.txt will ONLY have west sales data, North.txt will ONLY have north sales data.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help on this and guide me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sanket Kelkar.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 03:49:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307763#M79171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-09T03:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create Dynamic Output Files Based on Input File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307764#M79172</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;As a trivial solution you may use a tMap with filter for output flows.&lt;/P&gt; 
&lt;P&gt;Here is how it looks like:&lt;/P&gt; 
&lt;P&gt;&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="0683p000009Ls7x.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156384iEFD0B3E72AAFBD59/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ls7x.png" alt="0683p000009Ls7x.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In this example I filter only for West and South regions but you just have to add output for North and East with the appropriate filters.&lt;/P&gt; 
&lt;P&gt;After the tMap, connect each output flow to the desired file, and that's all.&lt;/P&gt; 
&lt;P&gt;Hope this help.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2018 18:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307764#M79172</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-03-10T18:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Dynamic Output Files Based on Input File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307765#M79173</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMssAAG"&gt;@Sanket&lt;/A&gt;&amp;nbsp;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;what is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;suggest&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;will work but&lt;SPAN&gt; the &lt;/SPAN&gt;hardcoded&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;condition.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What you are looking for is dynamic which this:&lt;/P&gt; 
&lt;P&gt;tfileinputdelim-&amp;gt;tflowiterate-&amp;gt;tFIxedflowinput (create 2 fields in out schema , declare the value of fileds&amp;nbsp;as ctrl+space , values from tflowiterate variable)-&amp;gt;tFIleoutdelim (in target path use lets say , "c:/myfiles/"+"_"+&amp;lt;region variable from flowtoiterate&amp;gt;+".txt" and also check 'append box'&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;try this proven method. any question ask.&lt;/P&gt; 
&lt;P&gt;if tomorrow u will add more region no problem , solution will work.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 19:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307765#M79173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-12T19:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create Dynamic Output Files Based on Input File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307766#M79174</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000062xvPAAQ"&gt;@snayak&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you for your inputs.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have achieved the scenario as shown in the attached screenshot-&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. tFileInputDelimited - Gives me all the region names from the source file.&lt;/P&gt; 
&lt;P&gt;2. tUniqueRow&amp;nbsp;- Gives me the list of unique regions.&lt;/P&gt; 
&lt;P&gt;3. tBufferOutput - Writes the list of unique regions in the buffer.&lt;/P&gt; 
&lt;P&gt;--- OnSubJobOk ---&lt;/P&gt; 
&lt;P&gt;4. tBufferInput - Retrieves the list of unique regions.&lt;/P&gt; 
&lt;P&gt;5. tFlowToIterate - Iterates through the list of unique regions and passes one region at a time to the next flow.&lt;/P&gt; 
&lt;P&gt;6. tFileInputDelimited - Accesses the entire source file to fetch actual data.&lt;/P&gt; 
&lt;P&gt;7. tFilterRow - Filters the rows only for the region for which the flow is iterating. Have put filter condition &lt;STRONG&gt;Region =&amp;nbsp;((String)globalMap.get("row3.Region"))&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;8. tFlowOutputDelimited - Creates a text file with the region name. The filename should be region name so have put&amp;nbsp;&lt;STRONG&gt;"E:/Talend DI/Output/"+ ((String)globalMap.get("row3.Region")) + ".txt"&lt;/STRONG&gt; as my filename.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The entire flow is dynamic and gives me what is expected.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Sanket Kelkar.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Ls5f"&gt;Regionwise_Dumps.png&lt;/A&gt;</description>
      <pubDate>Sat, 24 Mar 2018 04:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-Dynamic-Output-Files-Based-on-Input-File/m-p/2307766#M79174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-24T04:54:19Z</dc:date>
    </item>
  </channel>
</rss>

