Skip to content

Instantly share code, notes, and snippets.

@Zifah
Last active February 9, 2019 20:08
Show Gist options
  • Save Zifah/98d7911a168be4f3fba70cfc2b2d36bc to your computer and use it in GitHub Desktop.
Save Zifah/98d7911a168be4f3fba70cfc2b2d36bc to your computer and use it in GitHub Desktop.
Mounting an Azure blob storage container to Azure databricks file system
container_name = '{azure-blob-container-name}'
storage_name = '{azure-blob-storage-instance-name}'
mount_name = '/mnt/financial_survey_data' # This path can be used to access the contents of the blob container
sas_key = '{access-key-from-azure-portal}'
dbutils.fs.mount(
source = "wasbs://%s@%s.blob.core.windows.net" % (container_name, storage_name),
mount_point = mount_name,
extra_configs = {"fs.azure.sas.%s.%s.blob.core.windows.net" % (container_name, storage_name) : sas_key })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment