cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the status of notebook in different notebook

databicky
Contributor II

i want to run two notebook like if the count is not equal to zero, first i want to trigger the first notebook and i want to check the particular notebook is succeeded or not ,until the success it need to wait like sleep, if its succeeded means then i need to trigger the second notebook

2 REPLIES 2

Hubert-Dudek
Esteemed Contributor III
  • You can use dbutils.notebook.run() to execute a notebook from another notebook if conditions are met in your custom logic; you can also use dbutils.jobs.taskValues to pass values between notebooks https://docs.databricks.com/workflows/jobs/how-to-share-task-values.html,
  • you can terminate notebook execution as success using dbutils.notebook.exit,
  • you can terminate the notebook as failed using standard python "raise",
  • soon new DAG will be available so that it will also be possible via UI set task execution IF/ELSE depending on the state (currently, for Azure, you can use data factory for that to set it without coding)

i tried this method but how can i get status of the notebook and i want to store that one​

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!