azure-data-factorysendmail

Azure Data Factory send email on pipeline failure with Batch Service


I want so send an email if a pipeline fails. I can see tutorial using Logic Apps but for the moment I cannot use that service. I have searched for any other tutorial, but it looks like most of them use Logic Apps. Can you help me with some tutorial using Batch Service or any other service?


Solution

  • If you're looking for an alternative to Logic Apps, you can use Azure Data Factory Alerts and Metrics.

    Below are the Steps to configure this. Go to the Monitor Tab in your Azure Data factory.

    In the monitor tab at the bottom left side you will see ALERTS & METRICS

    Create a New Alert Rule

    enter image description here Provide the name to your Alert name and the Severity of the failed Pipeline.

    enter image description here Add the target Criteria in the add Criteria look for the 'Failed pipeline runs metrics'

    enter image description here

    enter image description here

    Once the Criteria is added you will find the Dimension & Value. Dimension will be your Pipeline's and Values failure type. And click on Add Criteria.

    enter image description here

    Next you will see Configure Email/SMS/Push/Voice notification. Configure notification.

    enter image description here Create Action group name, short name and Add Notification. enter image description here Provide the action name select the type as email and provide your email address then click add notification.

    enter image description here Once you create Action group name you will receive email confirmation that you are added to Action group. enter image description here Now click create Alert Rule. Once you create Alert rule and the pipeline fails It will trigger the email to you inbox like below enter image description here

    Upon following the above steps you can configure Alert for your Azure Data factory Pipeline failures and receive email alerts.

    Note: The email alerts will only work for Triggered Runs not for the De-bug runs