#1 2009-04-30 14:44:06

Augustine
Member
Registered: 2009-03-09
Posts: 52

ftpget with list of files

Tags: [filepath, ftp, iterate]

Hello !

I have a java job in which I create a file listing a number of filepaths. How can I use a FTPget to retrieve this list of files ?
I tried with a tinpufullrow and with a tforeach and with the filemask field of ftpget but it doesn't seem to be it.
Is there a way ?

Thank you ! smile

Offline

#2 2009-04-30 15:10:14

kboop
Member
Registered: 2008-08-25
Posts: 43

Re: ftpget with list of files

Hi Augustine,

Have you tried to use a tFlowToIterate between your tInputFullRow and your tFTPget ? I think it could do the trick ;-)
If your project is in java, you can find an example whith a tFlowToIterate in the following topic : http://www.talendforge.org/forum/viewto … 608#p22608

Regards,

Karine

Offline

#3 2009-04-30 15:34:59

Augustine
Member
Registered: 2009-03-09
Posts: 52

Re: ftpget with list of files

Thank you for your reply kboop !
Can you give me some more details though ? What do you write in your FTPget component settings to get the remote directory from the file ?
smile

Offline

#4 2009-04-30 16:07:17

shong
Talend team
Registered: 2007-08-29
Posts: 10294
Website

Re: ftpget with list of files

Hello Augustine

Can you show us an example of content of your file?

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2009-04-30 16:11:14

thomascap
Member
Registered: 2009-03-24
Posts: 11

Re: ftpget with list of files

I have a similar problem.

Is it possible to use Context variable in a filemask (in a FTPgetComponent) ?


Uploaded Images

Offline

#6 2009-04-30 16:18:05

Augustine
Member
Registered: 2009-03-09
Posts: 52

Re: ftpget with list of files

Hello shong !
My file contains filepaths like that :

file/Log/info.log
aladin/Log/info.log
baco/Log/info.trc
Pog/Log/info.log
Details/Log/info.log
saph/Log/info.log
BEW/Log/info.log
Ocean/Log/inflo.log
caliso/Log/info.log
infg/Log/bkup/info.log
...

Thank you for your help smile

Offline

#7 2009-04-30 18:11:34

shong
Talend team
Registered: 2007-08-29
Posts: 10294
Website

Re: ftpget with list of files

Hello

Here is a scenario,
in.csv:

file/Log/info.log
aladin/Log/info.log
baco/Log/info.trc
Pog/Log/info.log
Details/Log/info.log
saph/Log/info.log
BEW/Log/info.log
Ocean/Log/inflo.log
caliso/Log/info.log
infg/Log/bkup/info.log


expression of var1:

Code:

row1.line.lastIndexOf("/")+1

expression of filePath:

Code:

row1.line.substring(0,Var.var1)

expression of fileName:

Code:

row1.line.substring(Var.var1)

tLogRow_1:

Code:

Starting job forum6407 at 00:02 01/05/2009.
.--------------+---------.
|       tLogRow_1        |
|=-------------+--------=|
|filePath      |fileName |
|=-------------+--------=|
|file/Log/     |info.log |
|aladin/Log/   |info.log |
|baco/Log/     |info.trc |
|Pog/Log/      |info.log |
|Details/Log/  |info.log |
|saph/Log/     |info.log |
|BEW/Log/      |info.log |
|Ocean/Log/    |inflo.log|
|caliso/Log/   |info.log |
|infg/Log/bkup/|info.log |
'--------------+---------'

Job forum6407 ended at 00:02 01/05/2009. [exit code=0]

Best regards

         shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#8 2009-05-04 09:48:30

Augustine
Member
Registered: 2009-03-09
Posts: 52

Re: ftpget with list of files

Great ! This is exactly what I needed ! Thank you shong ! smile

Offline

Board footer

Powered by FluxBB