How to create tombstone records for tables with no primary key

I am using Confluent Oracle CDC to write a source connector. We have a DB with no primary keys. I can get the key from the message and put it in as the message key for Kafka. This works fine for inserts and updates. But when I use emit.tombstone.on.delete=true to handle the deletes it does not work ofcourse, because the message is null So what would be a good approach to solve this problem? The (JDBC) sink connector expects a tombstone record to perform the delete on a SQL Server database

I tried to set the value of the message to null after I extracted the key from the message but, I can’t get it to work. Also not sure if this is the right approach.
Any help would be appreciated.

Finally figured it out.
So for anyone with the same problem, this fixed it for me.

On the oracle source connector I used:
key.template=${rowId}
emit.tombstone.on.delete=true

On the sqlserver sink connector I used:
pk.mode=record_key
delete.enabled=true

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.