# Have delete in source system reflected as a soft delete in destination

**URL:** <https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458>\
**Category:** Kafka Connect\
**Created:** [5 December 2024 13:59 UTC](https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458 "2024-12-05T13:59:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshJoubert](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@JoshJoubert](https://forum.confluent.io/u/JoshJoubert)\
**Post date:** [5 December 2024 13:59 UTC](https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458/1 "2024-12-05T13:59:28Z")

</div>

Use case: A row is deleted from the source system and want to reflect the deletion as a soft delete in destination. Basically, I want to flip a flag in the destination system. Is this something that is possible with Kafka Connect?

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [5 December 2024 14:44 UTC](https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458/2 "2024-12-05T14:44:12Z")

</div>

What specific systems / connectors are you using? I can think of some examples where this would be doable, e.g.:

1. Debezium CDC source connectors give you delete events (e.g., see [here](https://debezium.io/documentation/reference/stable/connectors/postgresql.html#postgresql-delete-events) for Postgres)
2. The JDBC sink connector supports `upsert` [insert mode](https://docs.confluent.io/kafka-connectors/jdbc/current/sink-connector/sink_config_options.html#writes) where you can flip a flag of an existing DB record

Depending on the source / sink records and connectors used, you might have some record transformation to do in between, and you can either look at SMTs ([single message transform](https://developer.confluent.io/courses/kafka-connect/how-connectors-work/#single-message-transforms)) on the connector(s) or a more fully featured stream processing solution in the form of a Kafka Streams or Flink application.

---

<div class="post-metadata">

**Author:** ![JoshJoubert](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@JoshJoubert](https://forum.confluent.io/u/JoshJoubert)\
**Post date:** [6 December 2024 14:55 UTC](https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458/3 "2024-12-06T14:55:42Z")

</div>

These are moving data between 2 relational databases. I’m using the jdbc connector.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [5 January 2025 14:55 UTC](https://forum.confluent.io/t/have-delete-in-source-system-reflected-as-a-soft-delete-in-destination/13458/4 "2025-01-05T14:55:46Z")

</div>

Closed on 5 January 2025 14:55 UTC

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