Expecting successful output after mounting the container to databricks. I have used wasb for mounting purpose.
Error states: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Unable to access container tokyo-olympic-data in account tokyoolympicdatasg.blob.core.windows.net using anonymous credentials, and no credentials found for them in the configuration.
Couldn’t figure out the error as my authentication is absolute.
2
Answers
In your config you declare the provider – "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider".
So you need to start your source with "abfss://" and not "wasbs://"
abfss – is for Azure data lake storage
wasbs – is for accessing blob storage
Whenever you need to read from or store files in Blob Storage or ADLS Gen2, it is mandatory to mount it using either a SAS token or an Account Access Key.
Below is the syntax/code for Blob Storage.
Step 1: Blob Storage account Access Key or SAS Token.
I have tried the following approach:
Results:
If you want to mount ADLS Gen2 instead of Blob Storage, you only need to make a very minor change in the same code, which is highlighted below in bold.
For Blob Storage: wasbs://@.blob.core.windows.net/
For ADLS Gen2: abfss://@.dfs.core.windows.net/
The full form of wasbs is Windows Azure Storage Blob.
The full form of abfs is Azure Blob File System.
To check all mounted paths, use the command below:
To unmount:
Reference:
Mount Blob Storage and ADLS Gen2 in Azure Databricks