<?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: [resolved] How to pick a file from S3 with latest date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229783#M20629</link>
    <description>&lt;P&gt;please share the tjava and other vital components needed to accomplish this job. Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 15:37:37 GMT</pubDate>
    <dc:creator>NNot_defined1674577304</dc:creator>
    <dc:date>2023-06-10T15:37:37Z</dc:date>
    <item>
      <title>[resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229775#M20621</link>
      <description>Hi All,&lt;BR /&gt;For every 2 hours i used to get a new file in S3 and i have to take latest file depends on time from S3.&lt;BR /&gt;EX : My_File_20141104000001.csv&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; My_File_20141104030001.csv&lt;BR /&gt;can some one help me how to implement this using talend.&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Rajesh</description>
      <pubDate>Tue, 04 Nov 2014 06:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229775#M20621</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T06:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229776#M20622</link>
      <description>Hi Rajesh 
&lt;BR /&gt;Let me first ensure, if I've captured your requirements correctly: 
&lt;BR /&gt;1. Your source folder is fixed. 
&lt;BR /&gt;2. You intend to run your job every 2 hrs. 
&lt;BR /&gt;3. On every execution, you wish to pick the latest file (irrespective of its name). 
&lt;BR /&gt;Your confirmation would help formulate a solution in a better way. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;MathurM</description>
      <pubDate>Tue, 04 Nov 2014 08:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229776#M20622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T08:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229777#M20623</link>
      <description>Hi MathurM,&lt;BR /&gt;Thanks for your reply&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;1. Your source folder is fixed.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;My Source folder is fixed&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;2. You intend to run your job every 2 hrs.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;My job has to be run for every 2 hrs&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;3. On every execution, you wish to pick the latest file (irrespective of its name).&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Always my file name will be same i,e (My_File) and my job has to pick only the file which starts with (My_File) depends upon latest date&lt;BR /&gt;Thanks&lt;BR /&gt;Rajesh</description>
      <pubDate>Tue, 04 Nov 2014 08:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229777#M20623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T08:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229778#M20624</link>
      <description>This is a very common task that is not super easy to implement in Talend.&amp;nbsp; 
&lt;BR /&gt;Please have a look at my example job below and let me know if this helps you, or if I can assist further 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;To accomplish getting the newest file, we will get a list of files then get the properties for each of them. We will then sort the file properties by "mtime" or the last modified time and then grab the oldest for further processing.&amp;nbsp; 
&lt;BR /&gt;1) tFileList: this component is configured to look for files that start with my chosen string 
&lt;BR /&gt;2) tFileProperties: this component will retrieve the properties for each file.&amp;nbsp; 
&lt;BR /&gt;3) tBufferOutput: this component will store the file properties in memory so we can sort them once we've got info on all the files. 
&lt;BR /&gt;4) tBufferInput: this component will read from the buffer we populated with file property information 
&lt;BR /&gt;5) tSortRow: this component will sort the files by mtime descending (meaning the oldest file will be first in the list) 
&lt;BR /&gt;6) tSampleRow: this component is how we grab only the first row coming out of tSortRow 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130762i2B43C9F253B9B85E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTG.png" alt="0683p000009MBTG.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144817i5E856051C09D9CD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTL.png" alt="0683p000009MBTL.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144817i5E856051C09D9CD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTL.png" alt="0683p000009MBTL.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144817i5E856051C09D9CD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTL.png" alt="0683p000009MBTL.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157794iD071050D5C8C0A57/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTC.png" alt="0683p000009MBTC.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 04 Nov 2014 22:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229778#M20624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T22:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229779#M20625</link>
      <description>Hi JohnGarrettMartin, I feel with your above solution, we kind of drifted away a bit from the original problem. 
&lt;BR /&gt;Hi Rajesh, 
&lt;BR /&gt;I would suggest you try an approach on the lines of the job shown below. 
&lt;BR /&gt;Here,&amp;nbsp; 
&lt;BR /&gt;1. We first create a start flag (assigning it a value, say 'T') 
&lt;BR /&gt;2. Using tFileList component, we iteratively extract all the files from the source folder. This component, itself allows us to sort the order of the files. We can sort the files on 'modified date', &amp;amp; also arrange them in 'ASC or DESC' order. In present case, we choose 'DESC. 
&lt;BR /&gt;3. Further on, we arrange to iteratively process each of the file based on a 'IF' condition i.e. the 'FLAG' equals 'T' 
&lt;BR /&gt;4. On successful processing of the file, on a 'OnSubjobOk' link we change the 'FLAG' to say 'F'. 
&lt;BR /&gt;5. As a result, after the successful processing of the first file, the flag would be changed from 'T' to 'F'. Hence, no-more fulfilling the 'IF' condition &amp;amp; no further files would be processed. 
&lt;BR /&gt;This way, we can achieve the processing of only the latest file in the source folder on every execution. 
&lt;BR /&gt;hope this helps. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;MathurM 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTQ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133507iE34BBFAE194287EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTQ.jpg" alt="0683p000009MBTQ.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 05 Nov 2014 08:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229779#M20625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T08:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229780#M20626</link>
      <description>Hi,
&lt;BR /&gt;Do you have rights to move file from s3 bucket to another folder?
&lt;BR /&gt;if yes, then once the files are processed, move it to archive folder, this is much simpler than implementing work arounds...
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Wed, 05 Nov 2014 08:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229780#M20626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T08:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229781#M20627</link>
      <description>&lt;P&gt;Hi &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;Can I get assistance from this solution? I am currently working on the same issue (to picking up data from s3 bucket based on the latest file.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 03:25:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229781#M20627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-19T03:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229782#M20628</link>
      <description>&lt;P&gt;Hi Mathur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the advice. I know it has been five years since your post but can you please add the tJava code or screen shot of the tjava component that you have use to select the latest file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T.A&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 16:44:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229782#M20628</guid>
      <dc:creator>Tasfiahm</dc:creator>
      <dc:date>2019-07-01T16:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to pick a file from S3 with latest date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229783#M20629</link>
      <description>&lt;P&gt;please share the tjava and other vital components needed to accomplish this job. Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 15:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-pick-a-file-from-S3-with-latest-date/m-p/2229783#M20629</guid>
      <dc:creator>NNot_defined1674577304</dc:creator>
      <dc:date>2023-06-10T15:37:37Z</dc:date>
    </item>
  </channel>
</rss>

