I have an event based trigger that set on an data lake gen 2 folder. I need to trigger my pipeline only once for all these 20 files together. But now when these 20 files are loaded at a time, the event based trigger is triggering the pipeline for each file(20 times). And each trigger execution will again execute other files in the folder after the execution of triggered file.
My pipeline has foreach activity to handle all the files in my path. But my expectation is to trigger the pipeline only once regardless of the no:of files loaded.
It's by design, when a storage event trigger is created, it runs whenever the matched file or pattern is found in the given folder.
Alternatively, you can archive the processed file, so the same file is not processed multiple times.
Or you can get the list of files using the Get Metadata activity and loop it using until activity until all files are received in the source to process all files at once.