Home > Enterprise >  How can I get error details from an if condition activity in Azure Data Factory?
How can I get error details from an if condition activity in Azure Data Factory?

Time:11-29

I am creating a pipeline in which I have to pass a variable in a stored procedure from an If Condition in ADF.

The flow of the pipeline is like this:-

Lookup --> If Condition --> Stored Procedure

What I am trying to achieve is, I want to get the execution details (Only Failed or Succeed) of the If Condition. How can I do that?

THANKS!

CodePudding user response:

There are two approach as given below.

You can get success or fail message using Set Variable activity.

enter image description here

enter image description here

Other Approach you can follow is, Send an email notification for an error. For this approach you can follow this article by WOUT CARDOEN

Refer - https://docs.microsoft.com/en-us/answers/questions/85468/adf-need-status-of-actual-activity-failure-in-the.html

CodePudding user response:

I figured it out only about the error details:-

You can simply use the function in ADF like this:-

@activity('if Condition1').error.message

By the way the upper answer given by @AbhishekKhandave-MT is also good, but you can simply use the .error JSON to get the error code and message.

Thanks for helping out @AbhishekKhandave-MT

  • Related