The following provides usage information for the Apache Kafka® SMT
Convert timestamps between different formats such as Unix epoch, strings, and Connect Date/Timestamp types. Applies to individual fields or to the entire value.
Use the concrete transformation type designed for the record key (
org.apache.kafka.connect.transforms.TimestampConverter$Key) or value (
The TimestampConverter SMT operates on one field at a time.
This configuration snippet shows how to use
TimestampConverter to transform
a Unix epoch (represented as an
int64 value) into a formatted date string.
"transforms": "TimestampConverter", "transforms.TimestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value", "transforms.TimestampConverter.format": "yyyy-MM-dd", "transforms.TimestampConverter.target.type": "string"
For additional examples, see Timestamp Converter for managed connectors.
||The desired timestamp representation: string, unix, Date, Time, or Timestamp.||string||high|
||The field containing the timestamp, or empty if the entire value is a timestamp.||string||“”||high|
||Format string for the timestamp that is compatible with
Transformations can be configured with predicates so that the transformation is applied only to records which satisfy a condition. You can use predicates in a transformation chain and, when combined with the Filter (Apache Kafka), predicates can conditionally filter out specific records. For details and examples, see Predicates.