This is a set of Kafka Connect transformations.
See the Kafka documentation for more details about configuring transformations.
This transformation replaces the original record's timestamp with a value taken from the the record.
The transformation:
- expects the record value to be either a
STRUCTor aMAP; - expects it to have a specified field;
- expects the value of the field to be either
INT64ororg.apache.kafka.connect.data.Timestampand not benull.
Exists in one variant:
io.aiven.kafka.connect.transforms.ExtractTimestamp$Value- works on values.
The transformation defines the following configurations:
field.name- The name of the field which should be used as the new timestamp. Cannot benullor empty.
Here's an example of this transformation configuration:
transforms=ExtractTimestampFromValueField
transforms.ExtractTimestampFromValueField.field.name=inner_field_nameThis transformation extracts a string value from the record and use it as the topic name.
The transformation can use either the whole key or value (in this case, it must have INT8, INT16, INT32, INT64, FLOAT32, FLOAT32, BOOLEAN, or STRING type) or a field in them (in this case, it must have STRUCT type and the field's value must be INT8, INT16, INT32, INT64, FLOAT32, FLOAT32, BOOLEAN, or STRING).
Exists in two variants:
io.aiven.kafka.connect.transforms.ExtractTopic$Key- works on keys;io.aiven.kafka.connect.transforms.ExtractTopic$Value- works on values.
The transformation defines the following configurations:
field.name- The name of the field which should be used as the topic name. Ifnullor empty, the entire key or value is used (and assumed to be a string). By default isnull.skip.missing.or.null- In case the source of the new topic name isnullor missing, should a record be silently passed without transformation. By default isfalse.
Here is an example of this transformation configuration:
transforms=ExtractTopicFromValueField
transforms.ExtractTopicFromValueField.type=io.aiven.kafka.connect.transforms.ExtractTopic$Value
transforms.ExtractTopicFromValueField.field.name=inner_field_nameThis transformation manages tombstone records,
i.e. records with the entire value field being null.
The transformation defines the following configurations:
behavior- The action the transformation must perform when encounter a tombstone record. The supported values are:drop_silent- silently drop tombstone records.drop_warn- drop tombstone records and log atWARNlevel.fail- fail withDataException.
Here is an example of this transformation configuration:
transforms=TombstoneHandler
transforms.TombstoneHandler.type=io.aiven.kafka.connect.transforms.TombstoneHandler
transforms.TombstoneHandler.behavior=drop_silentThis project is licensed under the Apache License, Version 2.0.