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

Function not found when running from another Notebook using %run command.

jay_sharma
New Contributor III

Hi all,

I'm trying to run some functions from another notebook (data_process_notebook) in my main notebook, using the %run command command.

When I run the command: %run ../path/to/data_process_notebook, it is able to complete successfully, no path, permission or code errors. Since run command ran successfully, I'm assuming the functions have been defined correctly.

However later in my original notebook, I'm calling a function from the data_process_notebook.

I'm getting this error: "name 'myFunc' is not defined". I'm getting this output from the standard output logs from the driver.

I'm also running code from other notebooks, using the same %run command. I'm also calling the functions from these notebooks in my main notebook and they seem to be working fine.

I've re-started the cluster and I still get the same error.

Does anyone know how to resolve this? Would I have to copy the code from data_process_notebook into my main notebook in order to get it to run?

Thanks for the help

0 REPLIES 0
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.