...
TimestampConverter should have a config to define which precision to use when convert from and to Long epoch timestampsunix timestamp.
Currently, the Kafka Connect SMT TimestampConverter can convert Timestamp from multiples sources types (String, Long or Date) into different target types (String, Long or Date).
...
epoch.precision
, defaultmillis
which defaults tomillis
Proposed Changes
New config property for TimestampConverter
Code Block | ||
---|---|---|
| ||
"transforms.TimestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value", "transforms.TimestampConverter.field": "event_date_long", "transforms.TimestampConverter.epoch.precision": "micros", "transforms.TimestampConverter.target.type": "Timestamp" |
int32 and seconds
Since int32 should not be used for timestamp, obsolete systems Systems that produces int32 into Kafka and want should willingly chain Cast SMT and then TimestampConverter SMT if they want to use this feature.
...