0

In Databricks , we are able to access the ADLS file based on the following authentication code in Python mode .But when I tried to Authenticate for SQL mode getting below error . Please help us to get information on how to declare authentication in sql.

Python :

spark.conf.set("fs.azure.account.key.<your-storage-account-name>.dfs.core.windows.net","<access-key>")
df = spark.read.csv("abfss://<your-file-system-name>@<your-storage-account-name>.dfs.core.windows.net/<your-directory-name>/<your-file-name>")

Sql: reference:

error enter image description here

1 Answers1

1

you're using incorrect syntax. variables should be set with SET keyword, like:

SET fs.azure.account.key.<your-storage-account-name>.dfs.core.windows.net = <access-key>;

after that you could run your query.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132