I am trying to access the ADSL file from databricks. I tried using SAS Token, Access key and Also with SPark.config (Service Principle) But its still not working.
storageAccountName = "adlskush"
storageAccountAccessKey = "AccountKye"
sasToken = "SASToken"
blobContainerName = "input"
mountPoint = "/mnt/data/"
if not any(mount.mountPoint == mountPoint for mount in dbutils.fs.mounts()):
try:
dbutils.fs.mount(
source = "wasbs://{}@{}.blob.core.windows.net".format(blobContainerName, storageAccountName),
mount_point = mountPoint,
#extra_configs = {'fs.azure.account.key.' + storageAccountName + '.blob.core.windows.net': storageAccountAccessKey}
extra_configs = {'fs.azure.sas.' + blobContainerName + '.' + storageAccountName + '.blob.core.windows.net': sasToken}
)
print("mount succeeded!")
except Exception as e:
print("mount exception", e)
else:
print('not run')
I have given access to the storage account
here is mount code which is not showing me data from container.
Please someone please help me with.