Activity Dependencies How to Handle Flow of Activity On Success Failure Completion Skipped in ADF

Issue: Activity Dependencies How to Handle Flow of Activity On Success Failure Completion Skipped in ADF.


In this article, we are going to learn about activity dependencies, how to handle the flow of activity on success or failure or completion or skipped in Azure Data Factory, in this regard I have a scenario to explain, let's start our demonstration.

Open the Azure data factory studio, go to the Author tab, click on the + sign and create a new pipeline, find and bring the lookup activity, go to the settings tab, then click on the + New button to create a new source dataset.


Select Azure SQL database, then click on continue.


Name your dataset, select the linked service, select none for import schema, then click on Ok.


Inside the settings tab, click on Query, then write the query, in my case I have a table in the Azure SQL database, I am selecting the ID from the table, then uncheck the First row only.


Next, find and bring the wait activity then connect with our lookup activity on ''Success'' now if our lookup activity will complete successfully the wait activity will run if it fails the wait activity will not run.


After the execution you can see in the picture below, both activities run successfully.


Now, in another scenario,  find and bring another wait activity, then connect with the lookup on ''Failure'', now if our pipeline fails this activity will run and send an email to the administrator.


In this case, I have made changes in my query to make my pipeline to be failed, and then Debug the pipeline, once the execution is completed, in the below picture you can see the lookup activity fails and the wait activity did not run, and another wait activity which I configured on failure run successfully, the same way we can use the competition or skipped option.



Video Demo: Activity Dependencies How to Handle Flow of Activity On Success Failure Completion Skipped in ADF

No comments:

Post a Comment