cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks JDBC Driver Version 42 Limitations

Ankit_Kothiya
New Contributor II

We found that the Databricks JDBC driver does not support:

  • Connection.setAutoCommit(false)
  • Connection.commit()
  • Connection.rollback()
  • Execution of BEGIN TRANSACTION

Can you help us understand why these operations are not supported by the Databricks JDBC driver?
Is there an alternative JDBC driver for Databricks that supports the above-mentioned operations?

2 REPLIES 2

SP_6721
Contributor III

Hi @Ankit_Kothiya 

As far as I know, the Databricks JDBC driver doesn’t support manual transaction controls like setAutoCommit(false), commit(), rollback(), or BEGIN TRANSACTION. That’s because Delta Lake are designed to support atomic operations at the single statement or table level, not multi-statement transactions like you’d find in traditional databases. The JDBC driver runs in auto-commit mode by default, so it doesn’t allow for manual transaction handling.
As of now, there isn’t another JDBC driver for Databricks that supports those manual transaction features. Instead, you can use operations like MERGE or INSERT OVERWRITE, which are atomic on their own. And if you ever need to roll back changes, Delta Lake’s Time Travel feature can help with that.

Ankit_Kothiya
New Contributor II

Thank you, @SP_6721 , for your input!

Could you please share an example snippet demonstrating how to handle batch processing, similar to what we typically do in a relational database?