Mount Azure Storage Account to File System

Felix Lamp (DE) 1 Reputation point
2021-09-24T14:06:00.443+00:00

Hello,

I am using Synapse. I want to use my own Java Programm. I can import it into a scala workbook. My Java program uses java.io.File that needs a path to a file. Therefore I want to mount the Azure Storage Account to my file system.

I have located mssparkutils.fs.mountToDriverNode. However, this method does not seem to be documented online.

Can you help me?

Best,

Felix

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,358 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 76,746 Reputation points Microsoft Employee
    2021-10-12T07:33:18.727+00:00

    Hello @Felix Lamp (DE) ,

    (UPDATE: 1/11/2021): Currently these are the three authentication types are supported when trigger mount operation, via LinkeService, via accountKey and via sastoken.

    145491-image.png

    Method1: Using Linked Service

    mssparkutils.fs.mount(  
        "abfss://<FILESYSTEMNAME>@<STORAGENAME>.dfs.core.windows.net/", #ADLS GEN 2 PATH  
        "</MOUNTNAME>", #Mount Point Name  
        { "linkedService" : "<REPLACE LINKED SERVICE NAME>"}  
    )  
    

    Method2: Using SAS Token

    mssparkutils.fs.mount(  
        "abfss://<FILESYSTEMNAME>@<STORAGENAME>.dfs.core.windows.net/", #ADLS GEN 2 PATH  
        "</MOUNTNAME>", #Mount Point Name  
        { "sasToken" : "<REPLACE SAS TOKEN KEY>"}  
    )  
    

    Method3: Using Account Key

    mssparkutils.fs.mount(  
        "abfss://<FILESYSTEMNAME>@<STORAGENAME>.dfs.core.windows.net/", #ADLS GEN 2 PATH  
        "</MOUNTNAME>", #Mount Point Name  
        { "accountKey" : "<REPLACE AACOUNT KEY>"}  
    )  
    

    ------------------------------------------------------

    Welcome to the Microsoft Q&A platform.

    Currently, Azure Synapse Analytics doesn't allow mounting of Azure Storage accounts in Spark Pool.

    As per the conversation with product team, they are working on this feature and it will be available soon.

    I will update the thread once it goes live.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.