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

Unable to connect/read files from ADLS Gen2 using account key

farooqurrehman
New Contributor

It gives error

[RequestId=5e57b66f-b69f-4e8b-8706-3fe5baeb77a0 ErrorClass=METASTORE_DOES_NOT_EXIST] No metastore assigned for the current workspace.

using the following code

spark.conf.set(

  "fs.azure.account.key.mystorageaccount.dfs.core.windows.net",

  dbutils.secrets.get(scope="keyvault-secret-scope2", key="ADLS-GEN2-SECRET-KEY"))

dbutils.fs.ls("abfss://containername@mystorageaccount.dfs.core.windows.net/")

mystorageaccount: ADLS Gen2 account name

containername: Container name

scope="keyvault-secret-scope2" : scope created in Azure Databricks with Manage "All users"

key="ADLS-GEN2-SECRET-KEY" : secret in Azure key vault, having the ADLS Gen2 access key

3 REPLIES 3

Hubert-Dudek
Esteemed Contributor III

Vivian_Wilfred
Honored Contributor
Honored Contributor

Hi @Farooq ur rehmanโ€‹ ,

What's the Cluster security access mode? In the JSON of the cluster, the data_security_mode has to be set to LEGACY_SINGLE_USER. If this is set to SINGLE_USER, the cluster will look for a Unity Catalog metastore.

jose_gonzalez
Moderator
Moderator

Hi @Farooq ur rehmanโ€‹,

Just a friendly follow-up. Did any of the responses help you to resolve your question? if it did, please mark it as best. Otherwise, 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.