confluentinc / kafka-connect-jdbc

Kafka Connect connector for JDBC-compatible databases
Other
22 stars 958 forks source link

Error - Get current timestamp on firebird #747

Open sylwekdec opened 5 years ago

sylwekdec commented 5 years ago

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

gharris1727 commented 4 years ago

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.

TruptiM18 commented 3 years ago

@gharris1727 , Can I take up this task?

TruptiM18 commented 3 years ago

@gharris1727 , Can I take up this task?

maximilianobl commented 2 years ago

Can I take up this task?