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

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

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 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.
8,010 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 34,536 Reputation points Microsoft Employee

    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.

    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.