Skip to content

Instantly share code, notes, and snippets.

@korkridake
Created November 23, 2018 08:01
Show Gist options
  • Save korkridake/6477933e1a7478c02585a1c68ed32cce to your computer and use it in GitHub Desktop.
Save korkridake/6477933e1a7478c02585a1c68ed32cce to your computer and use it in GitHub Desktop.
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Set the Configurations
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
container_name = ['PLEASE INSERT BLOB CONTAINER NAME'] # the blob container name (any name is fine, e.g., korkridake01)
account_name = ['PLEASE INSERT ACCOUNT STORAGE NAME'] # the account storage name in Azure
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Start mounting from blob container
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Instruction: ['PLEASE INSERT MOUNTED POINT NAME] - (any name is fine, e.g., korkridake01)
# Instruction: ['PLEASE INSERT ACCOUNT STORAGE KEY] - (found in storage access key)
dbutils.fs.mount(
source = "wasbs://"+container_name+"@"+account_name+".blob.core.windows.net",
mount_point = "/mnt/['PLEASE INSERT MOUNTED POINT NAME]",
extra_configs = {"fs.azure.account.key."+account_name+".blob.core.windows.net":'['PLEASE INSERT ACCOUNT STORAGE KEY]'}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment