SQL DW连接器代码中遇到异常 [英] Exception encountered in SQL DW connector code
问题描述
我正在执行
教程:摘录,使用Azure Databricks转换和加载数据
一切都可以正常运行,直到scala笔记本的最后一步.
我在Scala笔记本中遇到以下异常.
com.databricks.spark.sqldw.SqlDWConnectorException:SQL DW连接器代码遇到异常.
在笔记本的上一步中,
//SQL Data Warehouse相关设置val dwDatabase =<数据库名称>""
val dwServer =<数据库服务器名称"<
val dwUser =<<用户名>"
val dwPass =<< PASSWORD>"
val dwJdbcPort ="1433"
val dwJdbcExtraOptions ="encrypt = true; trustServerCertificate = true; hostNameInCertificate = *.database.windows.net; loginTimeout = 30;"
val sqlDwUrl =" jdbc:sqlserver://" + dwServer +".database.windows.net:" + dwJdbcPort +; database =" + dwDatabase +; user ="; + dwUser +"; password =" + dwPass +; $ dwJdbcExtraOptions"
val sqlDwUrlSmall =" jdbc:sqlserver://" + dwServer +".database.windows.net:" + dwJdbcPort +; database =" + dwDatabase +; user ="; + dwUser +"; password =" + dwPass
我尝试了trustServerCertificate = false以及 trustServerCertificate = true.
前一种JDBC选项是SQL数据仓库实例对JDBC选项的建议,而后一种是本教程中的内容.
我已经完成了教程的所有先决条件,并且可以使用SSMS连接到SQL数据仓库.我还执行了创建主密钥" 解决方案
GitHub 问题,该问题解决了类似问题.
希望这会有所帮助.
I am carrying out the
Tutorial: Extract, transform, and load data using Azure Databricks
Everything seems to be working until the last step in the scala notebook.
I encounter the following exception in the scala notebook.
com.databricks.spark.sqldw.SqlDWConnectorException: Exception encountered in SQL DW connector code.
In the previous step of the notebook,
//SQL Data Warehouse related settingsval dwDatabase = "<DATABASE NAME>"
val dwServer = "<DATABASE SERVER NAME>"
val dwUser = "<USER NAME>"
val dwPass = "<PASSWORD>"
val dwJdbcPort = "1433"
val dwJdbcExtraOptions = "encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;"
val sqlDwUrl = "jdbc:sqlserver://" + dwServer + ".database.windows.net:" + dwJdbcPort + ";database=" + dwDatabase + ";user=" + dwUser+";password=" + dwPass + ";$dwJdbcExtraOptions"
val sqlDwUrlSmall = "jdbc:sqlserver://" + dwServer + ".database.windows.net:" + dwJdbcPort + ";database=" + dwDatabase + ";user=" + dwUser+";password=" + dwPass
I have tried trustServerCertificate=false as well as trustServerCertificate=true.
The former JDBC option is what the SQL Data Warehouse instance suggests for JDBC option, while the latter is what is in the tutorial.
I performed all of the prerequisites for the tutorials, and can connect to the SQL Data Warehouse using SSMS. I also executed the "CREATE MASTER KEY" command on the mySampleDataWarehouse.
Any insight into what I am doing wrong?
You may refer the suggestions outlined on GitHub issue, which addresses similar issue.
Hope this helps.
这篇关于SQL DW连接器代码中遇到异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!