ADF storage event trigger pipeline triggered by SFTP upload in storage account. Filters are deleted if trigger is stopped and start.

Paul Hernandez 671 Reputation points Microsoft Employee
2024-08-15T16:06:25.88+00:00

Hi everyone,

When you create a storage event trigger in Azure Data Factory, it automatically creates a new Event Grid system topic along with a webhook subscription:

User's image

To ensure that the trigger works when you upload files to the storage account using SFTP, you need to add filters for the data.api property with values SftpCommit and SftpCreate:

User's image

If the trigger is stop and start again, for instance, during a deployment, these manually added filters are gone:

User's image

My questions:

  • Is there any way to avoid that?
  • If not, what could be a consistent alternative

This is causing some maintenance overhead we would like to avoid.

BR. Paul

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,742 questions
0 comments No comments
{count} votes

Accepted answer
  1. phemanth 10,740 Reputation points Microsoft Vendor
    2024-08-16T13:51:33.9533333+00:00

    @Paul Hernandez

    Welcome to the Microsoft Q&A and thank you for posting your questions here

    When you stop and start the trigger in Azure Data Factory (ADF), the manually added filters for SftpCommit and SftpCreate are removed, causing maintenance overhead.

    Here are a few suggestions respective links attached to it

    1. Automation with ARM Templates: Use Azure Resource Manager (ARM) templates to automate the deployment of your ADF triggers. This way, you can include the necessary filters in the template, ensuring they are always applied when the trigger is deployed or redeployed.
    2. PowerShell or Azure CLI: Create a script using PowerShell or Azure CLI to reapply the filters whenever the trigger is started. This script can be part of your deployment pipeline to ensure the filters are consistently applied.
    3. Event Grid Subscription: Instead of relying solely on ADF triggers, consider creating an Event Grid subscription that listens for the SftpCommit and SftpCreate events and then triggers the ADF pipeline. This approach can provide more control and reduce the dependency on ADF’s built-in triggers.
    4. Custom Logic App: Use Azure Logic Apps to handle the event filtering and trigger the ADF pipeline. Logic Apps can provide more flexibility in managing events and can be configured to handle the specific SFTP events.

    Implementing one of these solutions should help reduce the maintenance overhead and ensure that your filters are consistently applied

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


0 additional answers

Sort by: Most helpful

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.