pop up when using databrics sql
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2025 07:07 AM
Hello,
I am uning databricks sql to read from a unity catalog table locally on a python project using an azure sp client id and client secret
the connexion is successful however i have a pop up that asks me to connect to my azure env
is there a way to make this connexion without the pop up since we go through a client secret and a client id ?
this is my code
from databricks import sql
from dotenv import load_dotenv
load_dotenv()
def get_conn():
return sql.connect(
server_hostname=os.getenv("DATABRICKS_HOST"),
http_path=os.getenv("DATABRICKS_HTTP_PATH"),
auth_type="azure-client-secret",
azure_client_id=os.getenv("client_id"),
azure_client_secret=os.getenv("client_secret"),
azure_tenant_id=os.getenv("tenant_id"),
)
with get_conn() as conn, conn.cursor() as cur:
cur.execute("SELECT * FROM *")
for row in cur.fetchall():
print(row)
thank you !
thank you !