It works fine, it connects to the db and writes correctly. Problem is that when i update on the source db a line already replicated on the destination db, the sink connector adds a new line instead of modifying the already existing.
Am i missing anything? I tried both the other options, insert and update and they both work as expected.
I meant what’s the payload that the JDBC Sink connector is going to be reading to then write to the target database? Specifically, how is it serialised and does the USERNAME field exist in the value part of the message?
the sink connector adds a new line instead of modifying the already existing.
You’ve shared the source DDL - what does the sink table DDL look like?
| BO_USERS | CREATE TABLE `BO_USERS` (
`USERNAME` text NOT NULL,
`PASSWORD` text NOT NULL,
`ENABLED` text NOT NULL,
`DATE_CREATION` int(11) NOT NULL,
`DATE_LAST_UPDATE` int(11) DEFAULT NULL,
`NAME` text NOT NULL,
`SURNAME` text NOT NULL,
`OFFICE_LOCATION` text NOT NULL,
`JOB_POSITION` text NOT NULL,
`CHANGE_PASSWORD` text,
`DATE_LAST_PASSWORD` int(11) DEFAULT NULL,
`must_change_password` text,
`NOTES` text NOT NULL,
`PREFERRED_TIMEZONE` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
the row from source db is serialized using avro converter (on both connector configurations, source and sink).
this is one example of the messages (unfortunately are not so much readable as converted to avro language, not sure if you have a way to translate):