%run command: Pass Notebook path as a parameter

lauraxyz
Contributor

Hi team!

I have a Notebook (notebook A) in workspace and I'd like to execute it with %run command from another Notebook (notebook B).  It works perfect with command: 

%run /workspace/path/to/notebook/A

Now, i want to specify above path in a variable, and pass that variable into the %run command, something like this: 

%run $notebook_path

where notebook_path is defined as notebook_path=/workspace/path/to/notebook/A.

However, i keep getting "Notebook not found" error, i also tried %run {notebook_path} which didn't work. How can i make this work?