• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Retrieving Latest Files From FTP (Java) on timestamp

#1 2011-02-28 17:41:00

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Retrieving Latest Files From FTP (Java) on timestamp

Tags: [ftp]

Hi,

On daily bases I am getting files which I need to retrieved by timestamp from FTP and store as files.

The reason why I have to look and retrieved my files from FTP by time stamp as I am name of the files are same but of course time stamp is different. Name comming in the format BAYSWATER_FIMPOS_N_20110131.TXT

So far I am able to get all files from FTP but I am not sure how to get new set of files wich are comming with same name but different timestamp.

I know I have post this question a few times but so far I did not get any solution for this problem.

I hope that this time someone can help me.


Thanks
zeljka

Offline

#2 2011-02-28 17:52:09

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: Retrieving Latest Files From FTP (Java) on timestamp

Take a look at tFTPFileProperties--
you can use the mtime or ctime to find newer files.

Offline

#3 2011-02-28 18:08:15

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Re: Retrieving Latest Files From FTP (Java) on timestamp

Hi Jonh,

As I am pretty new user of Talend and still in learning stage, I am not sure how to do filter mtime on tFTPFileProperties as if you see my image where is properties for tFTPFileProperties..

So far I had try a few solution but look like any is woring.

Do you have any screenshot of your work as I am sure that maybe will help.

Thanks


Uploaded Images

Offline

#4 2011-02-28 18:56:23

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: Retrieving Latest Files From FTP (Java) on timestamp

try something like this:

tFTPFileProperties---row-->tAggregateRow

in your aggregate row, set the abs_path as your "group by" column, and aggregate on max(mtime)

The output of the aggregate row should be one per row for each file with the same name by max mtime.

Offline

#5 2011-02-28 19:57:07

ZeljkaMom
Member
Company: SRL Global , London
Registered: 2011-01-14
Posts: 148
Website

Re: Retrieving Latest Files From FTP (Java) on timestamp

Thanks ,
I have done and will do testing ...

huge help..

Zeljka

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Retrieving Latest Files From FTP (Java) on timestamp

Board footer

Powered by FluxBB