ADLS - Accessing the ADLS from Databricks for SQL mode

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

Upvotes: 0

Views: 212

Answers (1)

Alex Ott
Alex Ott

Reputation: 87154

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.

Upvotes: 1

Related Questions