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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

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

Download