Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
- SCENARIO
[list=*]
I would solve in this way:
tFTPConnection -> tFTPFileList -> tFTPFileProperties -> tFTPOutputDelimited
In this way I do:
1) open the connection (OK)
2) read all the files name in the directory (OK)
3) take all the details from the files (OK)
4) write the list of files in cvs so with the next job I can download and delete without delete any new file (WRONG)
Everything work right: files' name are read, properties are fetched, csv is generated but inside there are only 3 blank rows without data (ftp files are 3).
How I can solve? Probably I need to create a SCHEMA to map tFTPFileProperties to something but I don't know what and where.
Any solution?
Thanks in advance
Tato
((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))
((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH"))
tFTPConnection -> tFTPList -> (iterate) -> convert variable to flow (tMap, tFixedFlowInput, tJavaFlex) -> tFileOutputDelimited
tFTPConnection -> tFTPList -> (iterate) -> tFTPGet - tFTPDelete
for tFTPGet - tFTPDelete use ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")) as filename
akatato wrote:
Sorry but I can't understand: where I can set the files to be deleted?
My scenario:
[list=1]
a job upload to the folder 100 files each second (usually about 1kb each but could be bigger)
DownoladJob run every 10s
When job starts (after first 10s) the tFTPList fetches the name of 1.000 files
tFTPGet (linked to tFTPList by ITERATE) downloads all 1.000 files (I'm sure because Talend Studio show "1.000 execs finished" on the iterate link)
I linked tFTPGet to tFTPDelete with ITERATE link but on it is shown "1 exec finished"?
If the job take 1s to run, in the beginning there are 1.000 files but when tFTPDelete run there will be 1.100 files
How I can be sure that will be deleted ONLY the 1.000 that were fetched in the beginning (and already downloaded)?
Tks