cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to create mount point in Databricks

Sas
New Contributor II

Hi

I am trying to create mount point in Azure Databricks, but mount point creation is failing with below error message

DBUtils.FS Handler.mount() got an unexpected keyword argument 'extra_config'

I am using following code

def setup_mount(storage_account_name,container_name):
    client_id="XXX"
    tenant_id="XXX"
    client_secret="XXX"
   
    print(1)
   
    configs={"fs.azure.account.auth.type.sasformulaone.dfs.core.windows.net":"OAuth",
            "fs.azure.account.oauth.provider.type.sasformulaone.dfs.core.windows.net":"org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
            "fs.azure.account.oauth2.client.id.sasformulaone.dfs.core.windows.net":f"{client_id}",
            "fs.azure.account.oauth2.client.secret.sasformulaone.dfs.core.windows.net":f"{client_secret}",
            "fs.azure.account.oauth2.client.endpoint.sasformulaone.dfs.core.windows.net":f"https://login.microsoftonline.com/{tenant_id}/oauth2/token"}
   
    print(2)
   


    dbutils.fs.mount(
        source = f"wasbs://{container_name}@{storage_account_name}.dfs.core.windows.net/",
        mount_point = f"/mnt/{storage_account_name}/{container_name}",
        xtraconfigs = configs)
   
    print(3)
   
    display(dbutils.fs.mounts())
1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @Sas

The error message you’re encountering indicates that the dbutils.fs.mount() function is receiving an unexpected keyword argument named 'extra_config'. The correct argument name should be 'extra_configs'.

To resolve this issue, you need to update the function call to use the correct argument name.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.