Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
abhi90
Creator II
Creator II

Send Mail IF File not available

I have a scenario. I want to send mail IF File is not available in Linux Directory. Basically It is FileWatcher. If File is available Job is going to Next Component.But IF File not available then It is not sending mails.If Anyone helps will be helpful

Labels (2)
13 Replies
abhi90
Creator II
Creator II
Author

Settings of the components attached in the post

Anonymous
Not applicable

Hi abhi90

There is a global variable pre-defined on tFileExist component, this variable stores the checking result of a file, you can use this variable as the condition of runIf connector, eg;

tfileExist--runIf1--continue to execute other subjobs

             --runIf2--tSendMail

 

set the condition of runif1 as:

((Boolean)globalMap.get("tFileExist_1_EXISTS"))

 

set the condition of runif2 as:

!((Boolean)globalMap.get("tFileExist_1_EXISTS"))

 

Regards

Shong

 

abhi90
Creator II
Creator II
Author

Hi Shong,

My File is not present in Linux Directory. But for not presence of File in Directory Still Mail not generating.

This is not presence of File

!((Boolean)globalMap.get("tFileExist_1_EXISTS"))

This is presence of File

((Boolean)globalMap.get("tFileExist_1_EXISTS"))

0683p000009Lrt5.jpg

abhi90
Creator II
Creator II
Author

In the tfileexist I am using:

((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH"))

Anonymous
Not applicable

Hi  

With this job design, there should be at least one file matched on tFileList, otherwise, all other components after tFileList will not run. 

 

Regards

Shong

manodwhb
Creator III
Creator III

Derive On Component error to mail component.

manodwhb
Creator III
Creator III

did it help you?

Manoj_MUTHURAJA
Creator
Creator

Hello,

Could you please eloborate your explanation because I am need of this part to add in my job.I am bit confused where and how to declare the condition to execute.0683p000009MaCk.png

Thanks in advance for your reply,

Manoj

Anonymous
Not applicable

@Manoj_MUTHURAJA, click the runIf link and open the Component settings view, you will see a Condition field where you can write the condition expression.