TAC - File Trigger - Multiple Triggers being Executed
I have a batch job that has a file trigger that checks every 15 minutes for the existence of a file mask: "*_consumption_*" We can have one or more files delivered at any time and want the file trigger to execute only once when the file mask is found in the polling folder. What's happening is that the trigger is firing for every instance of a file that matches the mask. The job itself iterates through all files - so we only want the job to be triggered one time - regardless of how many files match the mask. Is this possible? I've tried all combinations of the check boxes (EXISTS; CREATED; MODIFIED) and we always get one trigger for each file it finds. Will the file trigger always create a trigger for each filename that matches the mask? In my example we will have these files delivered and we look every 15 minutes using the file trigger: daily_consumption_file_1.txt historical_consumption_file_1.txt daily_consumption_file_2.txt historical_consumption_file_2.txt I want the job to fire - only once - when it finds any file matching the mask: "*_consumption_*". I'm getting 4 triggers fired.
The documentation doesn't make sense to me - but maybe that's just me: In order not to trigger job execution for every file in the polling folder, do the following: Exist: select this check box to trigger on file if the file already exists in the polling folder Created: select this check box to trigger on file if the file is being created and does not already exist in the polling folder Modified: select this check box to trigger on file if the file is modified.
Re: TAC - File Trigger - Multiple Triggers being Executed
I really do not like this kind of triggers in the TAC because they are pretty on the half way to be usable. Because we often have such problems we (me and my colleagues) decided a different approach. We start a job checking the the actual trigger conditions and start within this job (we call it trigger-job) with the custom component tRunTask (from Talend Exchange) the suitable task in the TAC. https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&pi=marketplace%252... There is also a documentation.