-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run another notebook from the current one #93
Comments
Thanks for reporting, this is a known issue and we are already working on it.
I will update you here once its finished
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Oleh Yermokhin ***@***.***>
Sent: Wednesday, September 14, 2022 11:09:11 AM
To: paiqo/Databricks-VSCode ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [paiqo/Databricks-VSCode] Run another notebook from the current one (Issue #93)
I have faced with an issue running the another notebook. So in the beginning of the our notebook we have something like
%run ../shared/data_platform_globals
When I run this using the extension I got following:
Exception: File '..shared/data_platform_globals.py' not found.
Running this from Databricks works without an issue.
Please let me know if more details needed.
—
Reply to this email directly, view it on GitHub<#93>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC2VO4QJD2D3HPWFR7Z6VCLV6GI3PANCNFSM6AAAAAAQMGPEHM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thank you for quick update! |
Hello @gbrueckl , any other method instead of %run to do the same ? |
Not as of now, you could only copy&paste the referenced code directly into your notebook I am afraid you need to wait till this feature is added which will hopefully be in the next few weeks |
just published v1.1.3 and a known limitation is that it currently only works if the referenced file uses the same language as the notebook (Python/PySpark) let me know your feedback! |
@gbrueckl Wonderful amazing work in quick time ! Just I'm getting a new error now related to the path :
|
well, you also need to download the referenced notebook locally assuming you use |
Ok thanks, so it has to be in the same local folder ! Thanks for explaining |
could you also post your full |
I also just added support for |
closing this as it was implemented and got no negative feedback anymore |
Sorry for the late feedback, it works. Thanks a lot for so quick adding. |
This doesn't appear to function correctly for me. When attempting to run a cmd with %run magic cmd - I get a file system error. EntryNotFound (FileSystemError) : Unable to resolve nonexistent file 'c:\Users\me\databricks-project\my-current-location\util\generic_notebook'. Its checking for a notebook relative to the notebook's current location, but it should be relative to the workspace. i.e. 'c:\Users\me\databricks-project\util\generic_notebook'. |
Very much depends on how you %run command looks Relative paths shoukd work but i could think of an issue with absolute paths |
Code : (calling_notebook) Folder Structure :
|
Can you try using a relative path starting with `. /` instead?
Also, are you using the workspace browser from the Databricks tab or a `dbws:/` mount from the VSCode Explorer?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: ben zimmer ***@***.***>
Sent: Thursday, October 13, 2022 8:10:52 PM
To: paiqo/Databricks-VSCode ***@***.***>
Cc: Gerhard Brueckl ***@***.***>; State change ***@***.***>
Subject: Re: [paiqo/Databricks-VSCode] Run another notebook from the current one (Issue #93)
Code : (calling_notebook)
cmd1 : %run databricks-project/util/generic_notebook
cmd2 : doing something with variables from the nested notebook in cmd1
Folder Structure :
databricks-project
L util
L generic_notebook
L calling_notebook
—
Reply to this email directly, view it on GitHub<#93 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC2VO4XCUBGQ2APWG6RTNC3WDBGCZANCNFSM6AAAAAAQMGPEHM>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
I downloaded the notebooks in question, from the Databricks tab, and it added a 'Workspace' folder to my VSCode project folder. I am opening the local notebook copy and running that notebook on our databricks cluster. When I use '%run /path/to/notebook' it does a relative search for the notebook I'm attempting to run, but to match the functionality of the Databricks editor, it should be an absolute path from the 'Workspace' folder. If I was to use a relative path it would make things more difficult. We have a ton of notebooks in various folder structures and if we had to use relative paths for each one of those notebooks, it would be a major headache. |
I think I could fix it - the new version will probably be released this week so stay tuned! reopening this ticket to update you here |
the issue should be fixed in this release, can you please try it and report back - thanks! Note: it is not yet published to the VSCode gallery |
just published v1.2.1 to the VSCode gallery |
I have faced with an issue running the another notebook. So in the beginning of the our notebook we have something like
%run ../shared/data_platform_globals
When I run this using the extension I got following:
Exception: File
'..shared/data_platform_globals.py'
not found.Running this from Databricks works without an issue.
Please let me know if more details needed.
The text was updated successfully, but these errors were encountered: