FileWatcher in Talend

Eight Stars

FileWatcher in Talend

Hi All,

 

I want to check existance of a file based upon which One of my Child Job will trigger. I have already done with tfileexist giving location of the file. Now I want to keep checking in that location untill and unless that file is available and it will be in loop upto file is available.So basically it will be in an infinite loop. I have placed one tloop where I am placing the condition in while Loop like 

i=1,

!((boolean)globalMap.get(tfile_exists)) =Condition

i++

But the problem is the loop is not working.  I have attached my Job screenshot.

 


Accepted Solutions
Forteen Stars

Re: FileWatcher in Talend

@abhi90 in this scenario,tWaitForFile will be usefull,please check.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Eight Stars

Re: FileWatcher in Talend

Hi,

@vapukov@manodwhb@TRF@rhall_2_0 any help will be appreciated Smiley Happy

Fifteen Stars TRF
Fifteen Stars

Re: FileWatcher in Talend

Based on your job design, tFileExists is executed only once, so the result of your condition will never change.
Also notice the variable associated to tFileExists is called tFileExists_1_EXISTS (if the component is called tFileExists_1).
So, review your logic and correct the variable name.

TRF
Eight Stars

Re: FileWatcher in Talend

Hi @TRF,
Yeah I using the condition like !(boolean variable of tfileexists). Can you please tell me what logic i will use so that it will keep checking fr the file
Forteen Stars

Re: FileWatcher in Talend

@abhi90 in this scenario,tWaitForFile will be usefull,please check.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Eight Stars

Re: FileWatcher in Talend

Hi @manodwhb,

 

Can you please let me know how to achieve this using tWaitforFile?

Forteen Stars

Re: FileWatcher in Talend

please try to implement in this way

https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/ENb3YdCeu2TceECJ7RAnTg

Untitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Eight Stars

Re: FileWatcher in Talend

Hi @manodwhb,

 

Your solution worked perfectly. But one thing I did was I kept Exit Loop once File will be created. So untill and unless it was gettting file it was iterating in the directory. Marking the psot as Solved Smiley Happy. Thanks a lotttttt

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch