How to find which activity called another activity in my ADF Pipeline

Viewed 1906

I have created a pipeline (LogPipeline) that logs other pipelines' status to a database. The idea is that every pipeline will call the LogPipeline at the start and at the end by passing pipeline name and pipeline ID along with other parameters like started/ended/failed.

The last parameter is "Reason" where I want to capture the error message of why a pipeline may have failed.

However, in a given pipeline there are multiple activities that could fail. So I want to direct any and all failed activities to my Execute Pipeline activity and pass the error message.

But on the Execute Pipeline when filling out the parameters, I can only reference an activity by its name, e.g. Reason = @activity['Caller Activity'].Error.Message.
However, since multiple activities are calling this Execute Pipeline, is there a way to say Reason = @activity[activityThatCalledExecutePipeline].Error.Message?

1 Answers

If my understanding is correct,there are multiple activities call the LogPipeline and you want to get those failed activities' names so that you could know the names inside LogPipeline. Per my knowledge,your requirement is not supported in ADF.

I'm not sure why you have to construct such complex scenario,even though you just want to log the specific fail activities and error messages anyway which is common requirement.There are many monitor ways supported by ADF,please follow below links:

1.https://docs.microsoft.com/en-us/azure/data-factory/monitor-using-azure-monitor#alerts

2.https://docs.microsoft.com/en-us/azure/data-factory/monitor-programmatically

I would suggest you getting an idea of Alerts and Monitor in ADF portal:

enter image description here

And you could set the Target Criteria

enter image description here

It includes:

enter image description here

Related