DataSentics Datasentics 01.06.2021

How to Execute a DataBricks Notebook From Another Notebook

As in DataBricks there are notebooks instead of modules; the back-end developer cannot apply the classical import and needs to use one of two ways of executing a notebook within another notebook. There are two methods of reaching this goal, and each has its pros and cons.The first method lies in using the run command, which the developer can implement to import functions and variables. As a result, the executed notebook can then access the functions and variables defined in the main machine and vice versa. But there is also the possibility of intentional override of functions and variables that can never happen while executing the command. It creates a new instance of the executed notebook aside from the main one. So newly called functions and variables are not reachable from the main machine. On the other hand, this method allows to pass parameter values directly to the executed notebook and create more complex solutions.

Read more