Access blob
My aim her is to create a secure mount point that could be reused in all my Databricks workbooks.
My assumption is that you already have a KeyVault, have a local Python installation, and a storage account that you want to access.
Create Secret Scope for Key Vault
Install Databricks CLI
In your local command prompt (CMD/PowerShell) run the command
Create Secret Scope for Key Vault
With DataBricks CLI you can now run “databricks secrets list-scopes” to see all scopes available.
If you don’t have a KeyVault scope already set up. Go into DataBricks, and in the URL add “secrets/createScope” in the end.
Scope Name: Could be anything I chose as you can see “KeyVault_Scope”
Mange Principal: I usually select All Users so it could be managed by all users.
DNS Name: Is found under properties in your KeyVault.
Resource ID: Is found under properties in your KeyVault.
After this is done you should be able to see the scope using “databricks secrets list-scopes” in DataBricks CLI.
Use secret in KeyVault
If you haven’t created any secret containing Access key to your storage account jet. Go to your storage account in Azure and select Access keys and copy one of your keys:
Open your KeyVault. Adde a name and paste the access key to the Secret Value and create.
Create Mountpoint in DataBricks
In a workbook in DataBricks use the dbutils.fs.mount command create a mount point.
My version with values from this page.
To Remove Mount point. Use a workbook: