I have created a simple job to message me whether file/s exists or not in a folder.
Scenario 1: When I used tFileExist with file name, the job works great. I get message 'File exist' or 'No File exist'.
tFileExist --> If --> tMsgBox (FileExist)
--> If --> tMsgBox (NoFileExist)
Scenario 2: But i want to use a folder where i can expect different files. So i added tFileList component with wildcard and 'Interated' to tFileExist.
But the job never shows neither 'File Exist' nor 'No File Exist', BUT it finishes successfully. (The attached screenshot has all informations).
Is it a product bug? or am i missing something?
I have gone thro many articles, cracked my head, but nothing is useful.
It seems no files are found on tfileList, the other components will not be triggered if there are no files. You need to check the filemask you set.
Yes it doesn't have file now, so i expect that tFileExist would trigger the tMsgBox (NoFile) and would say "no file exist". But it is not.
As you don't have the file in tfilelist component it won't trigger and it will not pass any output to the tfileexist component ,as a result tfileExit won't be able to check the IF condition.
Other way out.
Hope this solves your purpose...!!!!
I have replicated as like yours; When the tFileList_1 has file, the job shows me "File Exist" message. But the job gives me below error when no file in tFileList_1
Exception in component tFileList_1 (tFileExist)
This is what i tried (screenshot attached),
tFileList_1 --> tFileExist_1 --> If =((Boolean)globalMap.get("tFileExist_1_EXISTS")) --> tMsgBox
Check the If condition on tfilelist component global variable nb_file.
((Integer)globalMap.get("tFileList_1_NB_FILE")) <= 0
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend
Test drive Talend's enterprise products.