Hi All
How to delete records in the database through Kafka JDBC connector between 2 MSSQL servers?
Question 1:
JDBC Source connector can be added and be updated from source server to target server, why except deleted,?
Question 2:
Why can’t see any messages from “kafka-console-consumer.sh”
Question 3:
When I add " delete.enabled=true" on the JDBC Sink connector, it isn’t working for me.
I haven’t quite understood this question. Can you rephrase?
Do you mean “How to delete records in the origin database once copied over to the Kafka cluster?” or “Why would one want to?”
Hi @rmoff
I am so sorry, I can’t solve my issue, even though I’ve been seeing your video on youtube many times, please help me to fix my questions and, I have added more steps information into this topic.
thanks, again
Willie
The short answer to the question is that the JDBC source connector does a SELECT query. If you run a DELETE between two select queries, how would you expect any client to know that there used to be data there that it hasn’t seen yet? It can’t.
You would need to collect the database logs with change data capture. This is what the Debezium source connectors allow you to do, which I believe Robin mentioned in his posts linked.
To issue deletes in the sink connector, you’d need to write a null value for a given primary key. From Debezium, you’d have to map “op: d” records into null values, which you would be able to see in the console consumer, too