cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

DataBricks JDBC driver fails when unsupported property is submitted

Kaitsu
New Contributor

Hello!
The Databricks jdbc driver applies a property that is not supported by the connector as a Spark server-side property for the client session. How can I avoid that ? 
With some tools I do not have 100% control, eg they may add a custom jdbc connection property,
Most jdbc drivers ignore properties they dont understand, above behaviour let the server return a failure.
If there is no way to configure the jdbc driver, is there a way to let the Spark server ignore the client session property.

Thanks 

2 REPLIES 2

Khaja_Zaffer
Contributor III

I dont know what to answer you but databricks has a Databricks JDBC Driver installation and driver guide. I hope this might be useful. 

https://docs.databricks.com/aws/ja/assets/files/Databricks-JDBC-Driver-Install-and-Configuration-Gui... 

NandiniN
Databricks Employee
Databricks Employee

Hi @Kaitsu , 

The documentation mentions, If you specify a property that is not supported by the connector, then the connector attempts to apply the property as a Spark server-side property for the client session.

Unlike many other JDBC drivers that ignore unknown properties, the Databricks JDBC driver (based on the open-source Spark JDBC driver and older Simba-based drivers) attempts to pass them to the Spark server as session configuration properties, which can cause the server to fail the connection if it doesn't support the configuration.

Unfortunately, there is no direct, universal configuration property on either the Databricks JDBC driver or the Databricks server-side to instruct them to silently ignore all unsupported client session properties.

Is it possible for you to use a cluster or SQL warehouse which uses default or safe value to prevent the client's session-level override from causing a failure. Or override the "java.util.Properties" with the right set of properties.

// ...
String url = "jdbc:databricks://<server-hostname>:443";
Properties p = new java.util.Properties();
p.put("httpPath", "<http-path>");
p.put("<setting1>", "<value1");
p.put("<setting2>", "<value2");
p.put("<settingN>", "<valueN");
// ...
Connection conn = DriverManager.getConnection(url, p);
// ...

The error thrown is a handled error, and must give the indication on wrong parameters being passed and should be checked by the client.

Thanks!