DTStack / chunjun

A data integration framework
https://dtstack.github.io/chunjun/
Apache License 2.0
3.98k stars 1.69k forks source link

[Bug] [chunjun-connector-jdbc-base] clickhouse jdbc connection not supported setAutoCommit(false) #1913

Open fengjian1129 opened 1 month ago

fengjian1129 commented 1 month ago

Search before asking

What happened

When I tried to implement the synchronization function of clickhouse2hive, I found the following error message. Caused by: java.sql.SQLFeatureNotSupportedException: Transactions are not supported at ru.yandex.clickhouse.ClickHouseConnectionImpl.setAutoCommit(ClickHouseConnectionImpl.java:219) at com.dtstack.flinkx.connector.jdbc.source.JdbcInputFormat.openInternal(JdbcInputFormat.java:114)

I think the problem lies in this piece of code image

What you expected to happen

I hope to control clickhouse-source to skip opening transactions by configuring parameters,for example: image Because the default value is "semantic": "at-least-once"`, it does not affect other synchronization functions

How to reproduce

When using clickhouse-source to read data, this type of problem may occur

Anything else

null

Version

master

Are you willing to submit PR?

Code of Conduct

fengjian1129 commented 1 month ago

I think this can unify the management of whether transactions are enabled or not, without the need to change setAutoCommit for every chunjun-connector-module