tFTPGet - how wait for the remote file to be available

One Star

tFTPGet - how wait for the remote file to be available

Hi all
Situation:
I try to get a file from a ftp, which is created after I submit a requestfile.
Version:
TIS 3.0.2.
Problem:
unfortunatley the Waitforfile loop doesn't help me out.
My idea was, that the iterate would fire, each time the timeout would be finished and then trying to get the file, until the max loop count would be reached. An reaching of timeout should return componentError but waitForFile always exits with success, no matter if timeout occured or not!
I would appreciate a good idea or solution to that !

cheers , Benjamin
Community Manager

Re: tFTPGet - how wait for the remote file to be available

Hello
My idea was, that the iterate would fire, each time the timeout would be finished and then trying to get the file

No, the iterate will not be fired if there is not a file is created/deleted though the timeout is reached.
An reaching of timeout should return componentError but waitForFile always exits with success

tWaitForFile is used to monitor a director and trigger an event if there is a file which is created/delete. and the component always works fine even the timeout is reached.
If you want to always get files from FTP server in one time, you can try the tInfiniteLoop component.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFTPGet - how wait for the remote file to be available

Hi shong
Thank yo for the suggestion.
I am using now the following flow:
tLoop : (context.loopVar == 0) && (i< 10)
¦
tSleep
¦
tFTPget
¦
tJava : context.loopVar = ((Integer)globalMap.get("tFTPGet_1_NB_FILE"));
btw: TIS 3.0.4 tLoop allows double quotes " in condition (will not be removed) TIS 3.0.2. double quotes are not accepted.
Cheers
Suggestion: tFPTget with an option to wait for file (efficient because using always the same connection! ) wait-for-file/loopcount/loop-wait-sec

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads