问题
Help :) I need to connect from my Azure databricks cluster to a SQL Azure instance using my Azure AD credentials. I have tested and I can connect to the target database using SSMS (SQL Server Management Studio) through my Azure AD credentials so that works fine.
Firewall connectivity is fine. I have been able to temporarily test with a SQL username and password and this works fine, but that is about to be taken away from me.
However, connecting through databricks I get:
om.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:
How do I configure the driver? Or possibly use an alternative?
My code below.
Thanks
%python
jdbcHostname = "<MY>.database.windows.net" jdbcDatabase = "sqldb"
jdbcPort = 1433
jdbcUrl = "jdbc:sqlserver://{0}:{1};database={2}".format(jdbcHostname, jdbcPort, jdbcDatabase)
connectionProperties = {
"integratedSecurity" : "true",
"driver" : "com.microsoft.sqlserver.jdbc.SQLServerDriver"
}
print (jdbcUrl)
pushdown_query = "(select * from nodes) my_nodies"
df = spark.read.jdbc(url=jdbcUrl, table=pushdown_query, properties=connectionProperties)
display(df)
来源:https://stackoverflow.com/questions/55128319/databricks-jdbc-integrated-security