ADF - Run an activity if any one of a set of activities fail and capture failed activity details in that activity using User Defined Function

prasad ambulkar 0 Reputation points
2023-09-04T13:13:13.77+00:00

Currently I am running one generic activity when any of the activities in the pipeline fail based on the answer provided in

https://learn.microsoft.com/en-us/answers/questions/208812/adf-run-an-activity-if-any-one-of-a-set-of-activit and

https://learn.microsoft.com/en-us/answers/questions/1194734/adf-run-an-activity-if-any-one-of-a-set-of-activit

But I want to identify which activity is failed in pipeline across 30 activities in generic activity. We can write 30 if conditions in pipeline expression builder but I am looking for more optimized solution.

Do we have any solution to identify which activity is failed if we have large number of activities..?

I read https://learn.microsoft.com/en-us/azure/data-factory/concepts-data-flow-udf document where we can create User Defined Functions.

Can we achieve and optimized multiple if conditions with User Defined Function...?

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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,441 Reputation points Microsoft Employee
    2023-09-05T07:06:12.5333333+00:00

    Hi prasad ambulkar,

    Thank you for posting query in Microsoft Q&A Platform.

    Yes you are right. At this moment the best possible way is writing if conditions and identifying it only.

    User defined functions are with in dataflow to keep logic of transformations at one place. That will help here. Please check below link for more details of UDF in dataflows.

    User defined Functions in Mapping data flows in Azure Data Factory

    But, defined if some in build future can tell us which activity failed that's great feature to have. Great call out actually. Thank you for this feedback. I forwarded this feedback to internal team. I would encourage you to have a feedback item created for this at below link. Internal team monitors feedback there and consider for furture releases.

    https://feedback.azure.com/d365community/forum/1219ec2d-6c26-ec11-b6e6-000d3a4f032c?ref=blog.ippon.fr

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.


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.