Is there a (recommended) way to delete a record from a Kafka Connect JDBC Sink Connector where the record's value is not NULL?
For example, if my JSON configuration includes the following:
...
"delete.enabled": "true",
"pk.mode": "record_key",
...
And my record's value is non-null, is there a way to have that record be deleted in the database?
I ask because the record's value has a field that marks if it should be deleted i.e a column like "Operation" where "Operation" == "D" should be a delete in the database via JDBC.
If there is a standard/recommended way to do this I would love to hear it. My only other idea was to make a custom transform that checks the "Operation" column for the value "D" and if it is a match, we pass back the record with the PK intact but with the value set to NULL aka a tombstone record which should get picked up by the connector as a delete operation. Is that a possibility?
I appreciate any help, thank you!
No responses yet but I got my somewhat hacky solution to work:
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With