Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to Blob storage "no credentials found for them in the configuration"

I'm working with Databricks notebook backed by spark cluster. Having trouble trying to connect to the Azure blob storage. I used this link and tried the section Access Azure Blob Storage Directly - Set up an account access key. I get no errors here:

spark.conf.set(
  "fs.azure.account.key.<your-storage-account-name>.blob.core.windows.net",
  "<your-storage-account-access-key>")

But receive errors when I try and do an 'ls' on the directory:

dbutils.fs.ls("wasbs://<your-container-name>@<your-storage-account-name>.blob.core.windows.net/<your-directory-name>")

shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Unable to access container <container name> in account <storage account name>core.windows.net using anonymous credentials, and no credentials found for them in the configuration.

If there is a better way, please provide suggestion as well. thanks

like image 464
jKraut Avatar asked Oct 28 '25 12:10

jKraut


1 Answers

  1. You need to pass the storage account name and key while setting up the configuration . You can find this from azure portal.
spark.conf.set(
     "fs.azure.account.key.<your-storage-account-name>.blob.core.windows.net",
     "<your-storage-account-access-key>")
  1. Also while doing the ls you need to add Container name and directory name.
dbutils.fs.ls("wasbs://<your-container-name>@<your-storage-account-name>.blob.core.windows.net/<your-directory-name>")

Hope this will resolve your issue!

like image 166
Ayush Bijawat Avatar answered Oct 31 '25 08:10

Ayush Bijawat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!