<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Workspace client creation error in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/workspace-client-creation-error/m-p/65250#M32756</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to use Python SDK and create a workspace client using the following code:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;%pip install databricks-sdk --upgrade &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;dbutils.library.restartPython()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;from databricks.sdk import WorkspaceClient&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;w = WorkspaceClient()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the notebook:&amp;nbsp;&lt;A href="https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/1956674069935529" target="_blank"&gt;https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/1956674069935529&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And the compute cluster we are using is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=1374115405812811" target="_blank"&gt;https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=1374115405812811&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, the above code throws error as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;default auth: cannot configure default credentials&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The above code used to work for workspace&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712" target="_blank"&gt;https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and cluster&amp;nbsp;&lt;A href="https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=6867857852215282" target="_blank"&gt;https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=6867857852215282&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone please share how to fix?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 23:28:37 GMT</pubDate>
    <dc:creator>databrick_usert</dc:creator>
    <dc:date>2024-04-01T23:28:37Z</dc:date>
    <item>
      <title>Workspace client creation error</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-client-creation-error/m-p/65250#M32756</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to use Python SDK and create a workspace client using the following code:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;%pip install databricks-sdk --upgrade &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;dbutils.library.restartPython()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;from databricks.sdk import WorkspaceClient&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;w = WorkspaceClient()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the notebook:&amp;nbsp;&lt;A href="https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/1956674069935529" target="_blank"&gt;https://zg-core-tech-lab.cloud.databricks.com/?o=1374115405812811#notebook/1956674069935518/command/1956674069935529&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And the compute cluster we are using is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=1374115405812811" target="_blank"&gt;https://zg-core-tech-lab.cloud.databricks.com/compute/clusters/0320-052046-zfcxwjvb?o=1374115405812811&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, the above code throws error as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;default auth: cannot configure default credentials&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The above code used to work for workspace&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712" target="_blank"&gt;https://zg-data-eng-dev.cloud.databricks.com/?o=6867857852215282#files/1746507398130712&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and cluster&amp;nbsp;&lt;A href="https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=6867857852215282" target="_blank"&gt;https://zg-data-eng-dev.cloud.databricks.com/compute/clusters/1214-223614-clopq8r5?o=6867857852215282&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone please share how to fix?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 23:28:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-client-creation-error/m-p/65250#M32756</guid>
      <dc:creator>databrick_usert</dc:creator>
      <dc:date>2024-04-01T23:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace client creation error</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-client-creation-error/m-p/65262#M32760</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103104"&gt;@databrick_usert&lt;/a&gt;&amp;nbsp;, Hope you are doing well!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you check the version of the SDK running in this notebook? If it's not an upgraded version&amp;nbsp;then could you please try to upgrade the SDK version and then restart the python after the pip install?&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;%pip install databricks-sdk-py --upgrade&lt;/LI-CODE&gt;
&lt;P&gt;You can refer to this document to upgrade to the SDK version :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/sdk-python#--get-started-with-the-databricks-sdk-for-python" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/sdk-python#--get-started-with-the-databricks-sdk-for-python&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also, i am sharing the reference link for this issue, hoping it will help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/databricks/databricks-sdk-py/issues/221" target="_blank"&gt;https://github.com/databricks/databricks-sdk-py/issues/221&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please let me know if this helps and leave a like if this information is useful, followups are appreciated.&lt;BR /&gt;Kudos&lt;BR /&gt;Ayushi&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 05:00:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-client-creation-error/m-p/65262#M32760</guid>
      <dc:creator>Ayushi_Suthar</dc:creator>
      <dc:date>2024-04-02T05:00:23Z</dc:date>
    </item>
  </channel>
</rss>

