-
Feature Request
-
Resolution: Done
-
Major
-
2.3.0.Final
-
None
For some use cases it would be convenient to extract PK from a record's headers (`id` header).
Specifically, when using Outbox SMT (https://debezium.io/documentation/reference/stable/transformations/outbox-event-router.html), an event's `id` is put in the headers of emitted record
So the connector could be configured as follows:
"primary.key.mode": "record_header", "primary.key.fields": "id",
Currently, I need to use an additional SMT (`headerToField`):
{ "name": "user-db-sink-connector", "config": { "connector.class": "io.debezium.connector.jdbc.JdbcSinkConnector", ... "primary.key.mode": "record_value", "primary.key.fields": "id", "table.name.format": "inbox", "max.retries": 1, "transforms": "valueToJson,wrapValue,headerToField", ... "transforms.headerToField.type": "com.github.jcustenborder.kafka.connect.transform.common.HeaderToField$Value", "transforms.headerToField.header.mappings": "id:STRING" } }
- links to
-
RHEA-2024:129636 Red Hat build of Debezium 2.5.4 release