How to customize mail notification in Azure Data Factory
Hello Everyone !! I hope you all enjoyed my previous blog. Let’s deep dive into how to Customize the Mail notification after the Azure data factory pipeline is executed successfully. Custom mail notification will be sent after the pipeline execution completes. Customize mail notification can be used for operational purposes. In Azure data factory pipelines which are executing on the production environment and need to notify for its successful completion. Custom mail will notify the operational team after each Azure Data factory pipelines completion. That will help the operations to act quickly if it’s a failure notification.
Below are the step by step configuration how to customize the mail notification in Azure Data Factory
In Azure Data Factory a pipeline is created to copy the file from one storage container to another storage container. Also, in the real time project this scenario is very common were source file is received in the staging location. After processing the data file in the Azure data factory it needs to be moved to archive location.
In this pipeline we have created a Copy data activities, Linked services and Dataset. Configured the Sink, Source and other setting as shown in screen shot.
After Copy data activities we need to set up the custom mail notification which will notify the operational team or the mail recipient whose mail id is configured. To send the custom mail notification need to add the other activities as Web from the General tile as shown.
How to Configure the Web Activity:
General: Provide the Unique name to the Web activity.
Setting: In the URL Logic App configuration need to be given.
Method: In method select as POST.
Other fields are not mandatory so it can be ignored but if you want to do the cosmetic configuration then give the details.
Below are the step how to configure Logic App
Once you configured the Logic App, go to the Logic app designer and get the URL as shown in the screen and provide into the Azure data factory Web activity.
In the Logic App after the When a HTTP request is received component add the new action and select Outlook and then select the Send an Email (V2).
After selecting the Send an email (V2) you need to login with your mail ID credentials and then configured the other details as shown in the screen shot.
Fill the details like Body of mail message, Subject and the receipt to whom you want to notify.
Now everything is configured so need to trigger the pipeline from Azure data factory. Once it’s executed you can check the log and green tick sign in the both the components in the azure data factory pipeline.
You can check the Logic App configuration and check that does it has trigger the mail or not. Then check the mail box of the recipient which should get the notification.
Recipient will get this mail, you can do the other configuration like which pipeline failed, what is the error message, pipeline ID, Timestamp etc. These configuration are not mandatory but for the best practice you should use it.
Hope you all will like this post. Please share and subscribe our site for more articles related to Azure data factory platform.
Nazir is a senior consultant having over 10 years of experience in data warehouse development and implementation. He has strong experience in databases, ETL tools, and Linux/Unix Scripting. He has trained several batches on Azure SQL.