confluentinc / kafka-connect-jdbc

Kafka Connect connector for JDBC-compatible databases
Other
1.01k stars 953 forks source link

JdbcSourceConnector Failed to get current time from DB using Generic and query 'SELECT CURRENT_TIMESTAMP' #1395

Open sjcoala opened 4 months ago

sjcoala commented 4 months ago

I am using a database called Tibero, a Korean product. I am testing with Tibero connected as the jdbc source connector .

The case where the mode option was incrementing was tested. After changing the mode option to timestamp+incrementing, an error occurred in the query retrieving CURRENT_TIMESTAMP.

Tibero uses SELECT CURRENT_TIMESTAMP FROM DUAL. But jdbc source connector used SELECT CURRENT_TIMESTAMP ; So, I've got JDBC-8006:Missing FROM keyword. An error occurs.

What should I do?

Jdbc source connector configuration

{ "name": "jdbc-source-connector-tibero", "config": { "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector", "connection.url": "jdbc:tibero:thin:@127.0.0.1:8629:tbcdc", "connection.user": "tibero", "connection.password": "tmax", "topic.prefix": "dbserver1.TIBERO.", "poll.interval.ms" : 5000, "table.whitelist" : "TIBERO.CUSTOMERS", "mode":"timestamp+incrementing", "incrementing.column.name":"ID", "timestamp.column.name":"UPDATE_DATE", "validate.non.null":"false", "quote.sql.identifiers":"NEVER", "db.timezone":"Asia/Seoul", "topic.creation.default.replication.factor" : 1, "topic.creation.default.partitions" : 1, "transforms":"createKey,extractInt", "transforms.createKey.type":"org.apache.kafka.connect.transforms.ValueToKey", "transforms.createKey.fields":"ID", "transforms.extractInt.type":"org.apache.kafka.connect.transforms.ExtractField$Key", "transforms.extractInt.field":"ID" } }

####################################