kafka-connect-jdbc icon indicating copy to clipboard operation
kafka-connect-jdbc copied to clipboard

Error - Get current timestamp on firebird

Open sylwekdec opened this issue 5 years ago • 4 comments

Hi I need to set up kafka-connect with timestamp increment with Firebird. However I got an error: DEBUG TimestampIncrementingTableQuerier{table="CATEGORIES", query='null', topicPrefix='FB_', incrementingColumn='', timestampColumns=[LAST_MODIFIED]} prepared SQL query: SELECT * FROM "CATEGORIES" WHERE "CATEGORIES"."LAST_MODIFIED" > ? AND "CATEGORIES"."LAST_MODIFIED" < ? ORDER BY "CATEGORIES"."LAST_MODIFIED" ASC (io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier) [2019-11-21 15:00:08,553] DEBUG executing query SELECT CURRENT_TIMESTAMP to get current time from database (io.confluent.connect.jdbc.dialect.GenericDatabaseDialect) [2019-11-21 15:00:08,555] ERROR Failed to get current time from DB using Generic and query 'SELECT CURRENT_TIMESTAMP' (io.confluent.connect.jdbc.dialect.GenericDatabaseDialect) java.sql.SQLSyntaxErrorException: Dynamic SQL Error; SQL error code = -104; Unexpected end of command - line 1, column 8 [SQLState:42000, ISC error code:335544851]

In GenericDatabaseDialect.java there is a query to get current timestamp: 'SELECT CURRENT_TIMESTAMP' On Firebird it doesn't work.

It should be SELECT CURRENT_TIMESTAMP from rdb$database;

cheers Sylwester

sylwekdec avatar Nov 21 '19 15:11 sylwekdec

This will require a FirebirdDatabaseDialect implementation, which then needs to override the default behavior for that query.

We don't have plans for this at the moment, but would accept a community contribution for it.

gharris1727 avatar Dec 16 '19 23:12 gharris1727

@gharris1727 , Can I take up this task?

TruptiM18 avatar Aug 29 '21 13:08 TruptiM18

@gharris1727 , Can I take up this task?

TruptiM18 avatar Sep 16 '21 12:09 TruptiM18

Can I take up this task?

maximilianobl avatar Aug 06 '22 02:08 maximilianobl