Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
smoqt
Frequent Visitor

Mounting Azure Blob Storage Container using Fabric Notebook (PySpark)

I'm attempting to mount an Azure Blob Storage Container within a Fabric Notebook as suggested here.

 

I am setup as a Storage Blob Data Contributor on the container (which I have seen suggested).

 

The code:

 

from notebookutils import mssparkutils  

accountKey = mssparkutils.credentials.getSecret("<vaultURI>", "<secretName>")
mssparkutils.fs.mount(  
    "abfss://<mycontainer>@<accountname>.dfs.core.windows.net",  
    "/test",  
    {"accountKey":accountKey}
)

 

 

I get an error: "Mount failed with operationId <operationId>, get detail from /var/log/blobfuse/blobfusev2.log"

 

When checking the log, I notice the following sequence:

 

|2024-02-28T17:44:15.982905+00:00 vm-65b06715 blobfusev2[2878]: Testing authetication to /<some-guid>/test/ ...

|2024-02-28T17:44:16.036071+00:00 vm-65b06715 blobfusev2[2878]: Unknown failure: [json.exception.type_error.302] type must be string, but is number

|2024-02-28T17:44:16.036174+00:00 vm-65b06715 blobfusev2[2878]: Failed to connect to the storage container. There might be something wrong about the storage config, please double check the storage account name, account key/sas token/OAuth access token and container name. errno=1600

 

Naturally, I have double-checked the accountname and key as well as tried other methods like using a sas token.  So far, I'm have no success mounting anything (I also tried mounting a lakehouse but it just times out with no errors in the log).  Am I missing something?

3 REPLIES 3
smoqt
Frequent Visitor

As a test, I created two new containers within the same storage account and was able to mount both.  I've tried mounting other, pre-existing containers but none have mounted successfully.

 

Both were empty containers.  I then unmounted one of the containers, added an empty txt file to the container, tried mounting it again but got the error.

 

Next, I deleted the file, tried once more and it mounted successfully.

Hi @smoqt 
Thanks for using Fabric Community. 
Can you please provide the livy id/driver log or cluster id /session id for the above error?

Hi @egons11 

We haven’t heard from you on the last response and was just checking back to see if you can provide the details asked above. We will definitely try to help.
Thanks

Helpful resources

Announcements
Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayFBCUpdateCarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

Top Solution Authors