cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting status of "If Condition" Activity into a variable

sreedata
New Contributor III

"If Condition" has lot of activities that can succeeded or fail. If any activity fails then whole "If Condition" fails. I have to get the status of the "If Condition" activity (pass or fail) so that i can use it for processing in the next notebook that follows it.

Please suggest some ways

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

UmaMahesh1
Honored Contributor III

In your ADF Pipeline activity, set two different pipeline activities from the If condition activity based on success or failure (the green and red arrows).

Then inside each pipeline activity, you can add a set variable, get variable and your adb notebook activities. In set variable, you would be setting the status of your activity using the standard pipeline parameters.

Hope this helps...Cheers..

View solution in original post

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

Can you share your code? I don't know if python, SQL, or some logic in orchestration tool.

In python, you would need to set try catch in every if statement and use dbutils.notebook.exit('message') to handle it in another notebook.

dbutils.notebook.exit('message') .This is also a good way .But since my if activity has multiple notebooks it would get complicated.So setting base parameters from success and fail path helped

UmaMahesh1
Honored Contributor III

In your ADF Pipeline activity, set two different pipeline activities from the If condition activity based on success or failure (the green and red arrows).

Then inside each pipeline activity, you can add a set variable, get variable and your adb notebook activities. In set variable, you would be setting the status of your activity using the standard pipeline parameters.

Hope this helps...Cheers..

sreedata
New Contributor III

Thanks .This helped.Set a base parameter to the notebook with status sucess or fail

Kaniz
Community Manager
Community Manager

Hi @srikanth nair​, We haven’t heard from you since the last response from @Hubert Dudek​ and @Uma Maheswara Rao Desula​​, and I was checking back to see if their suggestions helped you.

Or else, If you have any solution, share that with the community as it can be helpful to others.

Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.