我正在使用Kafka Connect Sink配置从主题中获取数据并坚持到Oracle DB。像冠军一样工作,并且我正在对通过avro模式进行很长时间的timestamp列进行转换,然后转换为Oracle Timestamp列。
"transforms": "TimestampConverter",
"transforms.TimestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
"transforms.TimestampConverter.format": "mm/dd/yyyy HH:mm:ss",
"transforms.TimestampConverter.target.type": "Timestamp",
"transforms.TimestampConverter.field": "created_ts"
但是,我不知道如何在多个时间戳上执行此操作。也就是说,除了created_ts外,我还需要转换一个update_ts。
我尝试过:
"transforms.TimestampConverter.field": "created_ts, updated_ts"
不起作用,我也不能为其他字段重复整个块,因为Connect仅允许1个同名条目。
最后,我尝试了这个:
"transforms.TimestampConverter.field.1": "created_ts",
"transforms.TimestampConverter.field.2": "updated_ts"
答案 0 :(得分:1)
您将添加2个转换
emailNotification