Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-6725

ExtractNewDocumentState for MongoDB ignore previous document state when handling delete event's with REWRITE

XMLWordPrintable

    • False
    • None
    • False

      Deleting a database record with unwrap SMT and rewrite handling mode results in different events for MongoDB and relational databases

      For MongoDB:

      "transforms": "unwrap",
      "transforms.unwrap.type": "io.debezium.connector.mongodb.transforms.ExtractNewDocumentState",
       "transforms.unwrap.delete.handling.mode": "rewrite"
      

      an unwrapped delete events results in

      "payload": {
              "__deleted": true
      }
      

      However with MySQL

      "transforms": "unwrap",
      "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
      "transforms.unwrap.delete.handling.mode": "rewrite"
      

      an unwrapped delete event results it

      "payload": {
              "id": 1004,
              "first_name": "Anne",
              "last_name": "Kretchmar",
              "email": "annek@noanswer.org",
              "__deleted": "true"
      }
      

              jcechace@redhat.com Jakub Čecháček
              jcechace@redhat.com Jakub Čecháček
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: