-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
None
-
False
Currently Mongodb connector is not providing enough information in the payload for delete events.
for the delete events, it will be good improvement, if the key fields/values are added to payload as well
What is the connector configuration?
debezium.transforms=unwrap,renamekeyfield debezium.transforms.unwrap.type=io.debezium.connector.mongodb.transforms.ExtractNewDocumentState debezium.transforms.unwrap.delete.handling.mode=rewrite
full config visible here https://github.com/memiiso/debezium-server-iceberg/issues/291#issuecomment-1993483748
What is the captured database version and mode of depoyment?
mongodb
What behaviour do you expect?
for delete events payload should include `{}id` and `{}op` and `{_}_deleted` fields.
"payload":
"payload": { "_id": 1004, "__op": "d" "__deleted": true }
What behaviour do you see?
unwrapped event is:
"payload": { "__deleted": true }
Do you see the same behaviour using the latest relesead Debezium version?
YES
Do you have the connector logs, ideally from start till finish?
posted here https://github.com/memiiso/debezium-server-iceberg/issues/291
Feature request or enhancement
mongodb delete events should unwrap and add more information to payload.
especially `_id` and delete fields.
"payload": { "_id": 1004, "__op": "d" "__deleted": true }
Which use case/requirement will be addressed by the proposed feature?
This will align mongodb implementation to much closer to the standard and will align RDBMS standard
Implementation ideas (optional)
take the information from the key and add it to payload.
- relates to
-
DBZ-4083 CloudEventsConverter omits payload data of deleted documents
- Closed
-
DBZ-6725 ExtractNewDocumentState for MongoDB ignore previous document state when handling delete event's with REWRITE
- Closed
- links to
-
RHEA-2024:139598 Red Hat build of Debezium 2.5.4 release