简体   繁体   中英

can not connect to azure sql dw using azure databricks

I am trying to connect to Azure SQL data warehouse but receiving this error. "com.databricks.spark.sqldw.SqlDWSideException: SQL DW failed to execute the JDBC query produced by the connector"

further more it says that "The connection string contains a badly formed name or value. [ErrorCode = 0] [SQLState = null]"

Please help!

Make sure you are using the correct connection string to connect to Azure SQL Data Warehouse using Azure Databricks.

dwDatabase = "master"
dwServer = "azuresqldw"
dwUser = “azurewala"
dwPass = "*******"
dwJdbcPort = "1433"
dwJdbcExtraOptions = "encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=10;"
sqlDwUrl = "jdbc:sqlserver://" + dwServer + ".database.windows.net:" + dwJdbcPort + ";database=" + dwDatabase + ";user=" + dwUser+";password=" + dwPass + ";"+dwJdbcExtraOptions
sqlDwUrlSmall = "jdbc:sqlserver://" + dwServer + ".database.windows.net:" + dwJdbcPort + ";database=" + dwDatabase + ";user=" + dwUser+";password=" + dwPass
#print(sqlDwUrl)

Reference: Azure Databricks - Azure SQL Data Warehouse

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM