Solution skill
[ISSUE] AccountClient doesn't use host in .databrickscfg
Complete solution
Shows how to fix [ISSUE] AccountClient doesn't use host in .databrickscfg. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Delete or fix that env file and the host from your config is honored again. What was reported: Issue databricks/databricks-sdk-py#348 (closed, 5 comments): Description When you create a WorkspaceClient, you can set the host in your config file, which will be read successfully.
Steps
- What was reported:
Issue databricks/databricks-sdk-py#348 (closed, 5 comments): Description When you create a WorkspaceClient, you can set the host in your config file, which will be read successfully. If you define a host for an AccountClient, the host setting is ignored, and a workspace host is selected instead. Since a host gets set, the library code refuses to overwrite an existing value for the host. Reproduction Create a config file with at least two profiles. One to be used for a WorkspaceClient, and one for an AccountClient. ``` [account] host=https://accounts.azuredatabricks.net/ accountid=... azuretenantid=... azureclientid=... azureclient_secret [your value]
- What works:
AccountClient ignoring the host in .databrickscfg is usually not an SDK bug: the VS Code Databricks extension writes a .databricks/.databricks.env file that overrides the host. Delete or fix that env file and the host from your config is honored again.
When to use
You are seeing this: Since a host gets set, the library code refuses to overwrite an existing value for the host. Use this skill when you run into "[ISSUE] AccountClient doesn't use host in .databrickscfg".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://accounts.azuredatabricks.net/
Evidence
In the GitHub issue, the reporter asked: [ISSUE] AccountClient doesn't use host in .databrickscfg. The working answer that came out of the thread: AccountClient ignoring the host in .databrickscfg is usually not an SDK bug: the VS Code Databricks extension writes a .databricks/.databricks.env file that overrides the host. Delete or fix that env file and the host from your config is honored again. Source: https://github.com/databricks/databricks-sdk-py/issues/348
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_j2VftctULCCKX5BgPjJcBg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[ISSUE] AccountClient doesn't use host in .databrickscfg <span>— Vectle</span></a>