cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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_Fatma
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.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!