Transformations
Connectors can be configured with transformations to make lightweight per message modifications. Debezium provides several single message transformations (SMTs) that you can use to either modify records before they are sent to Apache Kafka (by applying them to the Debezium connectors), or when they are read from Kafka by a sink connector. Also Debezium Server supports the usage of SMTs.
The following SMTs are provided by Debezium:
Transform | Description |
---|---|
Re-routes records to different topics based on a regular expression applied to the original topic name. | |
Reroute selected events to other topics, based on the event content. | |
Extracts the flat structure of field names and values from Debezium change events, facilitating sink connectors which cannot process Debezium’s complex event structure. | |
The MongoDB-specific counter-part to the New Record State Extraction SMT. | |
Provides a way to safely and reliably exchange data between multiple (micro) services. | |
The MongoDB-specific counter-part to the Outbox Event Router SMT. | |
Applies a filter to the change events emitted by the connectors, based on their content. This lets you propagate only those records that are relevant to you. | |
Re-routes records to specific partition based on configured table column. |
By means of SMT Predicates you can apply any of the transformations selectively, so that it modifies only that subset of change event messages that share a common characteristic.
Most of the above SMTs are available by default with the Debezium container image, but you need to opt-in for the scripting-based ones (Message Filtering or Content-based Routing). See the README file of the container image for more details. |