Databricks JDBC Integrated Security

两盒软妹~` 提交于 2021-02-08 06:29:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!