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.
See below job.
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?
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
Try Talend Cloud free for 30 days.
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.