Forum Discussion
Notebook - mount a lakehouse fails
I'm trying to mount a lakehouse from another workspace to my Notebook by using this code:
notebookutils.fs.mount(
"abfss://<workspace_id>@msit-onelake.dfs.fabric.microsoft.com/<lakehouse_id>",
"/test"
)
NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
(Yes, I am replacing the <workspace_id> and <lakehouse_id> with the GUID's of my workspace and lakehouse)
I get an error:
Py4JJavaError: An error occurred while calling z:notebookutils.fs.mount. : java.util.concurrent.TimeoutException: Futures timed out after [30 seconds]
- Anonymous2 years ago
Hi frithjof_v ,
I failed at first with this code because the default timeout may not be enough, after increasing the timeout I succeeded:
notebookutils.fs.mount ( “abfss://<workspace_id>@msit-onelake.dfs.fabric.microsoft.com/<lakehouse_id>”, “/test”. {“timeout”: 600} )If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
6 Replies
- AnonymousNot applicable
Hi frithjof_v ,
Use this command to mount lakehouse to the current notebook.
mssparkutils.fs.mount(“abfss://<workspace_id>@onelake.dfs.fabric.microsoft.com/<lakehouse_id>”, “/lakehouse/test”) #mountPoint such as '/lakehouse/default'The successful mount is shown below:
You can also make sure that the mount is successful by executing this command below to list all the mount points.
mssparkutils.fs.mounts()If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!- frithjof_vCommunity Champion
Thanks, it worked!
however MS recommends to upgrade to notebookutils instead of mssparkutils:
NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
I get an error when trying to do the mount using Notebookutils:
NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
Does this code work on your side?
- AnonymousNot applicable
Hi frithjof_v ,
I failed at first with this code because the default timeout may not be enough, after increasing the timeout I succeeded:
notebookutils.fs.mount ( “abfss://<workspace_id>@msit-onelake.dfs.fabric.microsoft.com/<lakehouse_id>”, “/test”. {“timeout”: 600} )If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!