I tried to set up a database with a table with timestamp column . I am trying to implement timestamp mode to capture incremental changes in the DB.
But kafka-connect-jdbc is not reading any data from the table. Here is what I have done.
Created a table.
sqlite> CREATE TABLE test_timestamp(id integer primary key not null,
...> payment_type text not null,
...> Timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
...> user_id int not null);
sqlite> INSERT INTO test_timestamp (ID, PAYMENT_TYPE, USER_ID) VALUES (3,'FOO',1);
sqlite> select * from test_timestamp;
3|FOO|2019-06-18 05:31:22|1
My jdbc-source connector configuration is as follows:
$ curl -s "http://localhost:8083/connectors/jdbc-source/config"|jq '.'
{
"connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
"mode": "timestamp",
"timestamp.column.name": "timestamp",
"topic.prefix": "testdb-",
"validate.non.null": "false",
"tasks.max": "1",
"name": "jdbc-source",
"connection.url": "jdbc:sqlite:/tmp/test.db"
}
jdbc-source-connector successfully loads and topic is created
$ kafka-topics --list --bootstrap-server localhost:9092
..
testdb-test_timestamp
But no data appears in the topic.
Any help ?
Thanks in advance.