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

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?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now