Send email if an input file as not arrived

Five Stars

Send email if an input file as not arrived

Hi there,

 

I am trying to implement the following

 

Read files from tList by name

eg: file_20150601.txt, file_20150602.txt, file_20150603. 

If an incremental file is missing from the list, the job will load until the previous file and wait for next input file. 

 

Eg : If the folder only had two files, file_20150601.txt, file_20150603 my job will go to tWaitforFile file_20150602.txt after loading file_20150601.txt. 

 

I have everything working until that point. However, I want to send email after every iteration of tWaitForFile that the expected file is not available in the directory. How can I achieve that?

 

My Current tfile setting is attached. I have a tsendMail , after this, however it is only sending one email -after all iterations are completed. 

 

Thanks

Sixteen Stars TRF
Sixteen Stars

Re: Send email if an input file as not arrived

tWaitForFile terminates when the condition is completed.
So you should change your job as:
tLoop--tFileExists--(if no)--tSendMail--tSleep
+-(if yes)--tSetGlobalVar

The while condition is based on a global variable (lets say "done") setted to the appropriate value (for example true) when the file is detected

TRF

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 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog