0

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')

enter image description here

I have given access to the storage account

enter image description here

here is mount code which is not showing me data from container. enter image description here

Please someone please help me with.

Kushal Patil
  • 205
  • 1
  • 2
  • 14

0 Answers0