I have created an ADF pipeline which has several components to in it; execute a stored procedure, perform a copy data task. There are 14 in total (7 pair) and I want to trigger a failure that will send out an email with the error message.
I've gone and created a logic app to send an email as described in this link http://microsoft-bitools.blogspot.com/2018/03/add-email-notification-in-azure-data.html
In the 'Web Activity' component-> Settings-> Body, I have the following:
"DataFactoryName":
"@{pipeline().DataFactory}",
"PipelineName":
"@{pipeline().Pipeline}",
"ErrorMessage":
"@{activity('Execute Package').error.message}",
"EmailTo":
"@{pipeline().parameters.EmailTo}"
}
The 'Execute Package' is the name of the Stored Procedure or Copy Data activity.
The problem is that it only works for the named activity 'Execute Package'. I haven't been able to find anywhere that it can dynamically get where it is coming from. Is there any way to just have a singular web activity? I don't want to create 14 more things in my pipeline each to handle a different possible failure. The call to SendCompletionEmail works fine with the logic app since only one thing is calling it.