You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request failed while connecting to Azure Databricks using usql #230
Hi @calebeaires! It looks that at some point your connection URL get screwed up: the host part is substituted instead of endpoint, host part also looks wrong. Try to set DATABRICKS_LOG_LEVEL=debug env, run usql again and share a full log
I already have access to some test servers, will try them first. If you can connect to your server using different driver - most likely it's an issue with either this library or usql
The failure comes from usql's URL-to-DSN conversion, not this driver. usql's xo/dburlGenDatabricks builds the DSN as token:<user>@<password>.databricks.com:<port>/sql/1.0/endpoints/<host>, so with databricks://token:dapi…@adb-….azuredatabricks.net/... the PAT becomes the hostname (dapi…-3.databricks.com) and the real host becomes an endpoint ID. That matches the error in the screenshot, and it's unchanged in the dburl version used by the latest usql.
The driver itself parses a standard Azure DSN correctly, e.g. token:<PAT>@adb-<id>.<n>.azuredatabricks.net:443/sql/protocolv1/o/<org-id>/<cluster-id> (or /sql/1.0/warehouses/<id>). The fix needs to go into xo/dburl / xo/usql, so closing here.
Activity
kravets-levko commentedon Jun 5, 2024
Hi @calebeaires! It looks that at some point your connection URL get screwed up: the host part is substituted instead of endpoint, host part also looks wrong. Try to set
DATABRICKS_LOG_LEVEL=debugenv, runusqlagain and share a full logcalebeaires commentedon Jun 5, 2024
Thanks to follow this issue, here is the full log to:
calebeaires commentedon Jun 5, 2024
And here is where I've got the credentials
And where I've got the token
calebeaires commentedon Jun 5, 2024
I just changed it to URL to hide the complete azure url. It becames something like "adb-numeric-id.3.azuredatabricks.net"
kravets-levko commentedon Jun 5, 2024
Thank you! TBH I have no idea what's going on. I need some time to try it myself. Will get back to you when I have more info on this
calebeaires commentedon Jun 5, 2024
The server we created there is a testing environment. If you need I can send you the connection credentials.
kravets-levko commentedon Jun 5, 2024
I already have access to some test servers, will try them first. If you can connect to your server using different driver - most likely it's an issue with either this library or usql
calebeaires commentedon Jun 5, 2024
Yes, I can. Using DBeaver, the connection goes ok
Thanks
dmorel commentedon Jan 30, 2025
same issue here, the parameters get messed up as shown in the error message. Any news?
vuanhphung commentedon Oct 29, 2026
The failure comes from usql's URL-to-DSN conversion, not this driver. usql's
xo/dburlGenDatabricksbuilds the DSN astoken:<user>@<password>.databricks.com:<port>/sql/1.0/endpoints/<host>, so withdatabricks://token:dapi…@adb-….azuredatabricks.net/...the PAT becomes the hostname (dapi…-3.databricks.com) and the real host becomes an endpoint ID. That matches the error in the screenshot, and it's unchanged in the dburl version used by the latest usql.The driver itself parses a standard Azure DSN correctly, e.g.
token:<PAT>@adb-<id>.<n>.azuredatabricks.net:443/sql/protocolv1/o/<org-id>/<cluster-id>(or/sql/1.0/warehouses/<id>). The fix needs to go into xo/dburl / xo/usql, so closing here.