<?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: Creating file names based on row content in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370474#M133512</link>
    <description>This can get complicated.
&lt;BR /&gt;One you can put all your data rows into an object to read through them. &amp;nbsp;Use the tHashInput and tHashOutput
&lt;BR /&gt;Then feed that tHashInput to a remove duplicates based on the date column. &amp;nbsp;if you have it, use the tUniqueRow.
&lt;BR /&gt;Then for each unique date, use a tJavaRow to create a file with the date on it. &amp;nbsp;This is one SubJob
&lt;BR /&gt;Then another subjob starts and feed it the tHashInput with all the dates in it.
&lt;BR /&gt;Then use the tJavaRow, to read the date and feed that row to its corresponding Date_File.
&lt;BR /&gt;this is one quick way to do it. &amp;nbsp;hope this helps.</description>
    <pubDate>Wed, 22 Jul 2015 18:13:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-22T18:13:24Z</dc:date>
    <item>
      <title>Creating file names based on row content</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370473#M133511</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I Need to write a Job that will read a file that carries a date in each row. Example:&lt;BR /&gt;2015-07-20 bla&lt;BR /&gt;2015-07-20 blu&lt;BR /&gt;2015-07-21 lala&lt;BR /&gt;I will then Need to sort each row into a file that is named after the date:&lt;BR /&gt;File 2015-07-20_file will receive 2 rows, file 2015-07-21 will receive 1 row&lt;BR /&gt;How can that be done?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 17:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370473#M133511</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2015-07-22T17:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating file names based on row content</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370474#M133512</link>
      <description>This can get complicated.
&lt;BR /&gt;One you can put all your data rows into an object to read through them. &amp;nbsp;Use the tHashInput and tHashOutput
&lt;BR /&gt;Then feed that tHashInput to a remove duplicates based on the date column. &amp;nbsp;if you have it, use the tUniqueRow.
&lt;BR /&gt;Then for each unique date, use a tJavaRow to create a file with the date on it. &amp;nbsp;This is one SubJob
&lt;BR /&gt;Then another subjob starts and feed it the tHashInput with all the dates in it.
&lt;BR /&gt;Then use the tJavaRow, to read the date and feed that row to its corresponding Date_File.
&lt;BR /&gt;this is one quick way to do it. &amp;nbsp;hope this helps.</description>
      <pubDate>Wed, 22 Jul 2015 18:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370474#M133512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-22T18:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating file names based on row content</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370475#M133513</link>
      <description>Hi, thanks for the quick Response. The Problem with that approach might be that the files I am talking about are really large, so I can't really put them into an object.&lt;BR /&gt;I was hoping to simply extract the date from each row e.g. in a tMap and store that Information in some variable - which I could use in a tFileOutput component to create a dynamic Name.&lt;BR /&gt;But I don't know how that could work..</description>
      <pubDate>Wed, 22 Jul 2015 18:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370475#M133513</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2015-07-22T18:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating file names based on row content</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370476#M133514</link>
      <description>I was going to suggest pretty much the same; but was beaten to it.
&lt;BR /&gt;If your data is too large for HashMap, then try dropping it to a file.
&lt;BR /&gt;It doesn't look like you've got a delimiter, so I'm guessing you have a fixed length record.
&lt;BR /&gt;One general approach might be to...
&lt;BR /&gt;Read the file using tFileInputPositional. Strip out the dates using tMap (othr components can do this too). Make the rows unique tUniqRow and then write then to tHashOutput.
&lt;BR /&gt;Add a tHashInput and then connect this to tFlowToIterate. Now that you're iterating, you can refer to an entry put on tGlobalMap, so you've got the date.
&lt;BR /&gt;You can then use this value to fire a single row from tFixedFlowInput, that you can then join back to a second tHashInput.
&lt;BR /&gt;You should now be extracting the correct data, within each iteration.
&lt;BR /&gt;You can now write this to a new file, again referencing the date that was put on globalMap, for your file name generation.</description>
      <pubDate>Wed, 22 Jul 2015 18:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-file-names-based-on-row-content/m-p/2370476#M133514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-22T18:48:09Z</dc:date>
    </item>
  </channel>
</rss>

