0

I am executing azure databricks notebook and Keeping try catch for exception handling in that I want to exit notebook run when Exceptions meet true. I'm keeping notebook exit command but it is moving to next cell.

Below is my code and output when I executed notebook. Can you please check and help If I'm doing wrong in any place.

enter image description here

enter image description here

  • How did you run the notebook? – Phuri Chalermkiatsakul May 23 '22 at 07:08
  • 1
    You can refer : https://stackoverflow.com/questions/66275401/stop-execution-of-databricks-notebook-after-specific-cell – Karthikeyan Rasipalay Durairaj May 23 '22 at 17:22
  • 2
    If you executed this notebook from a different notebook (using %run or dbutils.run) or job then dbutils.notebook.exit('') will work. If you run the notebook from the notebook itself (Eg: Run All Cells button), it will work. However, if you run the cells using 'Run All Above' or 'Run All Below', dbutils.notebook.exit('') will not work. – Shalvin Abraham May 24 '22 at 13:09

0 Answers0