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

Support tombstones in JDBC Sink

XMLWordPrintable

    • False
    • None
    • False

      What Debezium connector do you use and what version?

      3.0.1.Final

      What is the connector configuration?

      Source flattens the output:

      {{{{ }}}}

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

       

      sink:

      {{{}}
          "name": "demo-sink",{{    {}}
      {{        "topics": "sever.schema.DEMO",}}
      {{         "connector.class": "io.debezium.connector.jdbc.JdbcSinkConnector",}}
      {{         "tasks.max": "1",}}
      {{         "connection.url": "jdbc:postgresql://postgres:5432/postgres",}}
      {{         "connection.username": "postgres",}}
      {{         "connection.password": "whatever",}}
      {{         "insert.mode": "upsert",}}
      {{         "delete.enabled": "true",}}
      {{         "primary.key.fields": "ID",}}
      {{         "field.include.list": "ID,}}
      {{        NAME",}}
      {{         "primary.key.mode": "record_key",}}
      {{         "schema.evolution": "basic",}}
      {{         "database.time_zone": "UTC",}}
      {{         "key.converter.schema.registry.url": "http://mskafka:8081",}}
      {{         "value.converter.schema.registry.url": "http://mskafka:8081",}}
      {{         "key.converter": "io.confluent.connect.avro.AvroConverter",}}
      {{         "value.converter": "io.confluent.connect.avro.AvroConverter",}}
      {{         "delete.tombstone.handling.mode": "tombstone",}}
      {{         "table.name.format": "demo"    }}
      {}{{    }}}{}}

      What is the captured database version and mode of deployment?

      N/A

      What behavior do you expect?

      Tombstones to delete rows in the database

      What behavior do you see?

      Tombstone events are ignored

      https://github.com/debezium/debezium/blob/7ea0c4dd7572ba466bd5a368aa8571c8a395bacd/debezium-connector-jdbc/src/main/java/io/debezium/connector/jdbc/JdbcChangeEventSink.java#L91

      Do you see the same behaviour using the latest released Debezium version?

      yes

      Do you have the connector logs, ideally from start till finish?

      can be provided

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      ability to delete data in replicated table

      Implementation ideas (optional)

      https://debezium.zulipchat.com/#narrow/channel/348252-community-sqlserver/topic/tombstones

              Unassigned Unassigned
              msillencefnz Martin Sillence
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: