How to send multiple files from event base trigger

Mahesh Totageri 21 Reputation points
2022-08-05T09:20:03.357+00:00

Hello Team,

I Hope your are doing great !!!

Could you please let me know is there any way to send multiple files from storage using event base trigger.
eg: now 5 files are added to my storage account event trigger is triggering 5 times, to avoid this i need to trigger one time after all files are added to source that to with event base only.

if you help it would be great.

Thanks,
Mahesh

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 36,146 Reputation points MVP Volunteer Moderator
    2022-08-05T11:20:19.887+00:00

    Hey,
    Any reason why you are mapping your event trigger to the original path source where all files are being created and uploaded ? Cant you create a dummy blob path at the end with a dummy file to have a final trigger once all files are uploaded to overcome this issue?
    note: You can get the count of files via meta data activity

    note: this is how we manage this :) but there is a redundant file generated unfortunately

    1 person found this answer helpful.

  2. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-08-05T10:06:22.607+00:00

    Hi @Anonymous ,

    Thank you for posting query in Microsoft Q&A Platform.

    Event based trigger will actually trigger pipeline for every event. That means, when a file landed to storage then it's an event and for that event it's going to run pipeline. Hence for 5 files landing you are seeing 5 executions. Each execution with for each file.

    So for sure, Event based trigger cannot wait for 5 files to land and trigger all of them as single execution.

    You can consider using normal trigger (schedule or tumbling window) and implement pipeline in such a way that it can take all 5 files and load it sink.

    Hope this helps.

    ----------------

    Please consider hitting Accept Answer button. Accepted answers help community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.