Errors within IF activity

Nagesh CL 641 Reputation points
2021-09-25T15:24:18.457+00:00

Hi Team,

I have an IF activity in my ADF pipeline. With in the IF activity, there are multiple activities. I am trying to log the error which occured within the IF. I have connected the failure connection of IF activity to a set variable activity (To capture error message to a variable). The error message that is captured is: -

"Activity failed because an inner activity failed".

Is there a way to capture the actual error message within the IF activity? In my case, i have a copy data (and many other activities) and that is failing. I need to capture the actual error message of the copy data activity. Is there a way to do that?

Likewise, any activity with in IF might fail. I need to capture those.

Regards,
Nagesh CL

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

Accepted answer
  1. Nandan Hegde 31,511 Reputation points MVP
    2021-09-27T06:12:36.613+00:00

    Hey Nagesh,
    In case of any conditional or iterative operator , you need to capture the message within the operator separately.
    In your case it would be activities within IF (True and false) scenarios.

    How to concatenate errormsgs of all activities in 1 common msg:
    https://datasharkx.wordpress.com/2021/08/19/error-logging-and-the-art-of-avoiding-redundant-activities-in-azure-data-factory/

    The other way would be to have the logic in another pipeline and call that pipeline.
    If the parent pipeline fails, the child pipeline would capture all the msgs.

    0 comments No comments

0 additional answers

Sort by: Most helpful