0
votes

I have a service principal using which I am trying to create an external table for Azure Data lake gen1. The external table creation fails with the error:

Error occurred while accessing HDFS: Java exception raised on call to HdfsBridge_IsDirExist. 
Java exception message:
HdfsBridge::isDirExist - Unexpected error encountered checking whether directory exists or not:
IOException: Server returned HTTP response code: 401

What I understand is that this is unAuthorized error. But I checked that this Service principle has proper role assignment in the Azure Data Lake Gen1 storage. What else could be causing the unauthorized issue here ? Does my SQL synapse instance where I am creating the external table also needs access to ADLS Gen1?

Please note that SQL Synapse instance and ADLS Gen1 instance are in different resource groups.

1
Can you post the T-SQL you're using? If it says 401, it's 401, as simple as that.Kashyap

1 Answers

0
votes

Just checked the Service principle I was using to create database scoped credentials, its secret had expired based on some periodic schedule. Renewed the secret and using the updated value helped fixing the issue.