[resolved] tFileExists component not working as expected.

Four Stars

[resolved] tFileExists component not working as expected.

tFileExists showing subjob ok even the file doesn't exist.
 have job where i generate a excel file, upon file creation i am doing the following
MainJob -->subjob ok --> tFileExists --> Subjob Ok -->tSendemail --> subjob ok --> tFileCopy
When the main job doesn't generate any file the tFileExists still shows as ok and goes on with email and file copy. And every time file copy fails due to no file present in the folder. I am also using context for file path and file name for creating, file exists check and file copy.
Is this a bug or i am doing something wrong.

Accepted Solutions
Highlighted
Five Stars

Re: [resolved] tFileExists component not working as expected.

You need to use an IF connector, with the condition
(Boolean)globalMap.get("tFileExist_1_EXISTS"))

All Replies
Highlighted
Five Stars

Re: [resolved] tFileExists component not working as expected.

You need to use an IF connector, with the condition
(Boolean)globalMap.get("tFileExist_1_EXISTS"))
Four Stars

Re: [resolved] tFileExists component not working as expected.

Thank you very much, that worked, i used  ((Boolean)globalMap.get("tFileExist_1_EXISTS"))   in the if condition, and when it is true the email and filecopy will trigger, when false do nothing.

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now