cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Trouble on Accessing Azure Storage from Databricks (Python)

Geoff123
New Contributor III

I used the same accessing method shown in https://community.databricks.com/t5/data-engineering/to-read-data-from-azure-storage/td-p/32230 but kept get the error below.

org.apache.spark.SparkSecurityException: [INSUFFICIENT_PERMISSIONS] Insufficient privileges:

Any help would be greatly appreciated.

7 REPLIES 7

Wojciech_BUK
Valued Contributor III

Hello,
I will try to help you, but need some more details:

1) Are you using Unity Catalog on your workspace?

2) What is your storage account Firewall configuration setup?

3) Which exactly method you are using ? (Do you mount it? Or do you set spark config)?

4) Which authentication method you are using? SAS / KEY / OAUTH ?

Wojciech,

Thank you for your reply!  Here are the answers of your questions.

1) Are you using Unity Catalog on your workspace? Yes

2) What is your storage account Firewall configuration setup?

Where can I find the Firewall configuration in my storage account?

3) Which exactly method you are using ? (Do you mount it? Or do you set spark config)?

I tried both mount and set spark config but got the same error.

4) Which authentication method you are using? SAS / KEY / OAUTH ?

I used the access key of the storage account to authenticate.

Thanks again!

Geoff123
New Contributor III

Hi Kaniz,

Thank you for your help!

Yes, I used the correct syntax for the file location.

source = "wasbs://"+blob_container+"@"+storage_account_name+".blob.core.windows.net/sub_folder_name/file_name.csv"

 

Wojciech_BUK
Valued Contributor III

Hi Geoff123,

you can also take a look on your Storage Account firewall and make sure it is accessiable by Databricks Cluster.

In addition to this, if you are using Unity Catalog, the access pattern to storage will be different.

Wojciech

Wojciech,

Do you have any helpful tutorial to show how to check that Databricks Cluster is accessible to the Storage Account Firewall?

Thanks!

Wojciech_BUK
Valued Contributor III

Hi,

you can find storage account firewall information by accessing resource in azure portal

Wojciech_BUK_0-1711634055007.png

 

Please mind that if you are using Unity Catalog you should NOT mount Storage Account, you should rather use abstraction of Storage Creadentials and External Location (optionally External Volumes)  

I have the same settings as yours in Networking settings.

Geoff123_0-1711658477119.png

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group