top of page

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.

Install Databricks CLI

Register Keyvault in Entra

Create Secret Scope for Key Vault

Use secret in KeyVault

Create Mountpoint in DataBricks

Remove Mount

Install Databricks CLI
In your local command prompt (CMD/PowerShell) run the command

InstallAnchor

Create Secret Scope for Key Vault

With DataBricks CLI you can now run “databricks secrets list-scopes” to see all scopes available.

CreateSecretAnchor

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.

DBsec.jpg
KeyVaultProp.jpg

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:

UseSecretAnchor
StorAccessKey.jpg

Open your KeyVault.  Adde a name and paste the access key to the Secret Value and create.

GenerateSec1.jpg
StorAccessKey2.jpg

Create Mountpoint in DataBricks

In a workbook in DataBricks use the dbutils.fs.mount command create a mount point. 

CreateMountAnchor

My version with values from this page.

To Remove Mount point. Use a workbook:

RemoveMountAnchor
bottom of page