#1 2012-06-26 18:21:53

manju.mohanan
Member
Company: DailyMail
Registered: 2012-02-07
Posts: 50
Website

Problem using tFileExist

Hi,

I need to design a job, which reads files from a directory and processes them. If the directory is empty I need to fail the job. I have attached the current design , it works when there is only one file in the Directory. IF there are more than one file , it doesnt process them and doesnt throw any error. Can anyone please guide me how to go about this?


The if condition on tFileExist is as follows :-
((Boolean)globalMap.get("tFileExist_1_EXISTS"))


Many Thanks,
Manju


Uploaded Images

Offline

#2 2012-06-27 05:06:08

shong
Talend team
Registered: 2007-08-29
Posts: 10355
Website

Re: Problem using tFileExist

Hi Manju

The tFileExist component is redundant, the process do always continues while tFileList finds matched files.

tFileList--iterate-->tFileinputDelimited--->tMap---tFileOutputDelimited

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2012-06-27 05:16:18

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Problem using tFileExist

Hi Manju

You might use this in the Run-if trigger: ((Integer)globalMap.get("tFileList_1_NB_FILE"))>0.

Regards,
Pedro


Only Paranoid Survive.

Offline

Board footer

Powered by FluxBB