databricks_sql_connector not connecting

Upendra_Dwivedi
Databricks Partner

Hi All,

I am trying to connect to sql warehouse using a databricks_oauth auth type using databricks-sql-connector.

from databricks.sql import connect
conn = connect(
    server_hostname="https://adb-xxxxxxxxxxxxxx.azuredatabricks.net/", 
    http_path="/sql/1.0/warehouses/xxxxxxxxxxxxxx", 
    auth_type="databricks-oauth"
)

Now this query is running like forever, not able to connect. is there any limitation to this auth type?.

MuthuLakshmi
Databricks Employee
Databricks Employee

@Upendra_Dwivedi 
Have you installed the databricks-sdk dependency?

https://docs.databricks.com/aws/en/dev-tools/python-sql-connector

Hi, 
I am doing U2M auth and in the documentation it is not mentioned to instyall databricks-sdk.

Upendra_Dwivedi_0-1747729532928.png

 

Also, i am doing this in Databricks. so maybe there are some restriction and i am not aware for those.