โ02-18-2015 01:26 PM
โ11-10-2019 04:08 PM
@Prabhu4284 When I run Notebook B (which defines a function) it is still not defined in Notebook A. Are you sure we can import all things (functions, variables, etc.)? It appears from the Databricks documentation that only strings can be shared between Notebooks and pointers to data.
โ10-03-2020 07:53 AM
I declared a function in notebook commonFunction and called it from other function just by giving this command:
%run ./CommonFunction
I went ahead and used the function defiend in other notebook
infact o could access the variable defined in other notebook and vise versa too.
โ10-03-2020 12:55 PM
โ06-09-2021 10:22 PM
I have a programming background so restarting my kernel every and running things top to bottom was always common sense to me. I do agree though that it can be misleading and people may not make that assumption. I think one flaw with his programming style at the end that notebooks solve is having the history of how you checked your data throughout the process.
โ06-28-2023 04:16 PM
Of course you can, in your primary notebook, use the %run magic command followed by the path or name of the notebook file you want to run, like this:
%run /path/to/other_notebook.ipynb
โ06-28-2023 04:43 PM
absolutely you can.
there is databricks documentation explaining everything you need to know here: https://docs.databricks.com/notebooks/notebook-workflows.html
โ06-28-2023 04:58 PM
YES. You can use this script to do it
%run ./path_to_other_notebook
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group