This request provides a step-by-step by explanation to get the error details if any of the sequential activities fails.
When we try to get the error details with an expression like activity('<activity_name>').Error.Message of the any activity when the activities are in sequential, we will get the below error.
The expression for <activity_name> cannot be evaluated because property 'Error' cannot be selected.
Correction Details:
This guide will allow users to:
Handle the above error and will help to get the activity error details.
Steps:
Prerequisites:
Create minimum two pipeline activities (In this case both activities are Execute pipeline activities) and both should execute in a sequential manner.
Reason for the above error:
The reason for this error is, when the first activity itself is a failure, the pipeline flow will not execute the second activity. Here, we are using the above expression to get the second activity error as well but in this case, it didn't executed so there will be np error details for this activity.
Steps to avoid this error:
Modify the pipeline flow like below.
Use the below pipeline expression to get the error details.
This Correction request aims to improve user experience and security by providing clear documentation and example scripts to get the error details of a sequential activity in an ADF pipeline.
Document Enhancement Proposal: Get error details if any of the Sequential activity fails in an ADF pipeline.
Documentation: https://learn.microsoft.com/en-us/azure/data-factory/tutorial-pipeline-failure-error-handling
Overview
This request provides a step-by-step by explanation to get the error details if any of the sequential activities fails.
When we try to get the error details with an expression like
activity('<activity_name>').Error.Message
of the any activity when the activities are in sequential, we will get the below error.Correction Details:
This guide will allow users to:
Handle the above error and will help to get the activity error details.
Steps:
Prerequisites:
Create minimum two pipeline activities (In this case both activities are Execute pipeline activities) and both should execute in a sequential manner.
Reason for the above error:
The reason for this error is, when the first activity itself is a failure, the pipeline flow will not execute the second activity. Here, we are using the above expression to get the second activity error as well but in this case, it didn't executed so there will be np error details for this activity.
Steps to avoid this error:
Modify the pipeline flow like below.
Use the below pipeline expression to get the error details.
Conclusion
By following this guide, users can avoid the above error and can get the error details of the any activity sequential activity.
Reference:
https://stackoverflow.com/questions/79190722/how-to-save-error-details-in-set-variable-activity-if-any-sequential-activity-fa/79191139#79191139
This Correction request aims to improve user experience and security by providing clear documentation and example scripts to get the error details of a sequential activity in an ADF pipeline.
ms.author: @makromer ms.reviewer: @jburchel