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: 

Workspace client creation error

databrick_usert
New Contributor

Hi,

We are trying to use Python SDK and create a workspace client using the following code:

%pip install databricks-sdk --upgrade

dbutils.library.restartPython()

from databricks.sdk import WorkspaceClient

w = WorkspaceClient()

Here is the notebook: https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/...

And the compute cluster we are using is:

https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=13741154058128...

However, the above code throws error as:

default auth: cannot configure default credentials

The above code used to work for workspace 

https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712

and cluster https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=686785785221528...

Can anyone please share how to fix?

Thank you

 

 

1 REPLY 1

Ayushi_Suthar
Databricks Employee
Databricks Employee

Hi @databrick_usert , Hope you are doing well! 

Can you check the version of the SDK running in this notebook? If it's not an upgraded version then could you please try to upgrade the SDK version and then restart the python after the pip install? 

%pip install databricks-sdk-py --upgrade

You can refer to this document to upgrade to the SDK version : 

https://learn.microsoft.com/en-us/azure/databricks/dev-tools/sdk-python#--get-started-with-the-datab...

Also, i am sharing the reference link for this issue, hoping it will help you. 

https://github.com/databricks/databricks-sdk-py/issues/221

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group