Workspace client creation error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 04:28 PM
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:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 10:00 PM
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 :
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