I am working on a solution where we have CSV files being created in Azure Blob storage. These files contain account names for employees that we want to perform particular tasks on – One or more tasks for each employee in each file.
We decided to use Azure Data Factory to process these CSV files. We process each file in a pipeline that we trigger with an event-based trigger. Seems simple enough by looking at the documentation I’m linking to, right? Well, not so fast, buddy!
The Problem Description
There are actually two variations to this problem with the same root cause.
Creating a Trigger Without a Pipeline
First, I tried to create the trigger without having a pipeline. I wanted to see that I get the connection to the blob storage right, and just have a quick look at how the trigger is set up.
It was easy to create it, and connect it to the right blob container, and on the file preview dialog, I could preview the files, and my filters were hitting correctly. All seemed working OK.
I started running into problems when I tried to save the trigger. Nothing happened! The dialog just vanished! I tried a few times, just to make sure I did click the right buttons, but the end result was the same; No trigger was created.
Create a Trigger for an Existing Pipeline
Next I thought that OK, maybe there’s a bug that occurs when you create event-based triggers without associating them with pipelines. So, I created a simple pipeline with just one action and added an event-based trigger to that pipeline.
Now, when I clicked Save on the trigger dialog, I actually got the trigger saved. Cool, I thought. Apparently, I was a bit “trigger happy” (pun intended) with my joyfulness; When I tried to activate the trigger and publish the changes, the publish failed to activate the trigger.
I’m not going to bore with the details of my problem solving. Suffice to say that the answer was in the activity log for the Data Factory instance in question.
I would also like to thank Toon Vanhoutte for his post about the Event Grid trigger in Logic Apps not firing. That pointed me in the right direction.
Sure enough, the Microsoft.EventGrid resource provider was in fact unregistered. You find your resource providers by navigating to Subscriptions / [Your subscription], and then scrolling down to Resource providers under Settings.
I simply selected the resource provider, and clicked Register. After a while, the provider was registered. I also was able to activate the event-based trigger. Case closed, and customer happy!
Seems that you can never emphasize this too much – When in doubt, check your activity and application insights logs!
Helene · April 17, 2020 at 00:22
This was my exact problem. Thanks so much for publishing the solution.
Mika Berglund · April 17, 2020 at 08:29
Great! Good that you got your problem sorted.
Jon C · September 15, 2022 at 06:04
Amazing…this solved my problem as well, thank you for this! I don’t think I would have figured out in my Activity Log anyway so I’m happy I found this post. Thanks again!