MOUNTING ADLS GEN2 ON SYNAPSE SPARK POOL

Anonymous
2021-10-29T20:11:49.25+00:00

I want to mount datalake to specific mount point , want to read data from there , so i tried the below code

mssparkutils.fs.mount( source = "abfss://container@adls.dfs.core.windows.net/",
mountPoint = "/mnt/mdpdevfs",
extraConfigs = configs)

i tried giving all ways of authorization in configs , still im getting
"com.microsoft.spark.notebook.msutils.InvalidCredentialsException: Please provide at least one of LinkedService name, accountKey or sasToken for authorization." Error , how can i solve this?

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,334 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,338 questions
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,335 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,904 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 76,511 Reputation points Microsoft Employee
    2021-11-01T09:35:15.807+00:00

    Hello anonymous user,

    Thanks for the question and using MS Q&A platform.

    From the error message it clearly says that - "com.microsoft.spark.notebook.msutils.InvalidCredentialsException: Please provide at least one of LinkedService name, accountKey or sasToken for authorization"

    145473-image.png

    Currently these are the three authentication types are supported when trigger mount operation, via LinkeService, via accountKey and via sastoken.

    145455-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>"}  
    )  
    

    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

0 additional answers

Sort by: Most helpful