cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Access azure storage account from databricks notebook using pyspark or SQL

Ambi
New Contributor III

I have a storage account - Azure BLOB Storage

There I had container. Inside the container we had a CSV file. Couldn't read the file using the access Key and Storage account name.

Any idea how to read file using PySpark/SQL? Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Atanu
Esteemed Contributor
Esteemed Contributor
6 REPLIES 6

Hubert-Dudek
Esteemed Contributor III

@Ambiga D​ , How to mount Azure Data Lake Storage - https://community.databricks.com/s/feed/0D53f00001eQGOHCA4

How to mount blob storage (remember to allow network access to storage from your databricks workspace):

configs = {"fs.azure.account.key.YOUR_STORAGE.blob.core.windows.net" : "YOUR_KEY"}
 
dbutils.fs.mount(
  source = "wasbs://YOUR_CONTAINER@YOUR_STORAGE.blob.core.windows.net",
  mount_point = "/mnt/YOUR_FOLDER",
  extra_configs = configs)

Ambi
New Contributor III

@Hubert Dudek​ , Thank you for the the solution. Couldn't create the private endpoint in the network access. We will work on this and update you.

Hubert-Dudek
Esteemed Contributor III

Hi, have you managed to mount?

Kaniz
Community Manager
Community Manager

Hi @Ambiga D​ , Just a friendly follow-up. Do you still need help? Please let us know.

Atanu
Esteemed Contributor
Esteemed Contributor

@Ambiga D​ you need to mount the storage https://docs.databricks.com/data/data-sources/azure/azure-storage.html#mount-azure-blob-storage-cont... you can follow this,thanks.

Hi @Ambiga D​,

Just a friendly follow-up. Did any of our previous replies help you to resolved this issue? Please let us know if you still need help

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.