bjnr
bjnr

Reputation: 3437

Try Catch in Azure Data Factory

Given 5 pipelines, I want to execute them in chain, but don't stop execution in case one fails and gracefully fail at the end just in case any pipeline failed.

What is best approach?

What I tried? On Failure for each activity, add an entry in an array variable called ListOfFailedActivities and at the end call FailActivity. But this is not enough, because the process doesn't continue when one activity fails. The question is how to continue after fail of one activity?

Upvotes: 1

Views: 2723

Answers (1)

Nandan
Nandan

Reputation: 4925

You can use on completion after every activity rather than on success, this would ensure that all chained activities are executed. For the final pipeline failure part in case of any activity failure, you can use a IF activity and error activity to throw error in case if any of the activity has an error message.

My blog would explain in detail: https://datasharkx.wordpress.com/2021/08/19/error-logging-and-the-art-of-avoiding-redundant-activities-in-azure-data-factory/

Upvotes: 2

Related Questions