Forum Discussion

frithjof_v's avatar
frithjof_v
Community Champion
2 years ago
Solved

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]

  • Anonymous's avatar
    Anonymous
    2 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 Team

     

    If 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

  • Anonymous's avatar
    Anonymous
    Not 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 Team

     

    If 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!

      • Anonymous's avatar
        Anonymous
        Not 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 Team

         

        If 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!