We're migrating from blob storage to ADLS Gen 2 and we want to test the access to Data Lake from DataBricks. I created a service principal which has Blob Storage Reader and Blob Storage Contributor access to Data Lake.
My notebook sets the below spark config:
spark.conf.set("fs.azure.account.auth.type","OAuth")
spark.conf.set("fs.azure.account.oauth.provider.type","org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
spark.conf.set("fs.azure.account.oauth2.client.id","<clientId")
spark.conf.set("fs.azure.account.oauth2.client.secret","<secret>")
spark.conf.set("fs.azure.account.oauth2.client.endpoint","https://login.microsoftonline.com/<endpoint>/oauth2/token")
//I replaced the values in my notebook with correct values from my service principal
When I run the below code, the content of the directory are shown correctly:
dbutils.fs.ls("abfss://ado-raw@<storage account name>.dfs.core.windows.net")
I can read a small text file from my data lake which is only 3 bytes but when I'm trying to show its content, the cell gets stuck at running command and nothing happens.
What do you think the issue is? and how do I resolve it?
Thanks in advance