tFileExist does work when using context Variable

Four Stars

tFileExist does work when using context Variable

I am using Talend ESB Opem Studio 7.1 running on MacOS Mojave.  I want to check if a file exists and fail the process if it isn't.

 

When I pass hardcoded filepath/name the component works as expected '

!((Boolean)globalMap.get("tFileExist_1_EXISTS"))' returns FALSE. as the file definitely exists

 

however with same file name passed as Context variable in tFileExist, above expression returns FALSE.

 

Please help

 

 

 See below job.

Screenshot 2019-02-05 at 15.45.56.png


Accepted Solutions
Employee

Re: tFileExist does work when using context Variable

@amoakshe Could you please advise whether the details helped to resolve your issue? If yes, could you please mark the topic as resolved? Warm Regards, Nikhil Thampi Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Highlighted
Employee

Re: tFileExist does work when using context Variable

Hi,

 

    Did you print the value of your context variable to see whether the data in the context variable is right?

 

    Also one another thing I would look is whether you are giving just file name or fully qualified file path. 

 

    Could you please look these details and update if the error still persists?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Five Stars

Re: tFileExist does work when using context Variable

You need to give the context.path+context.filename.
I am already using that component in the same way to trigger the next flow if file exist

Employee

Re: tFileExist does work when using context Variable

@amoakshe Could you please advise whether the details helped to resolve your issue? If yes, could you please mark the topic as resolved? Warm Regards, Nikhil Thampi Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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