Kafka Connect concatenate fields and convert to timestamp

时间:2019-04-08 13:57:59

标签: apache-kafka apache-kafka-connect

I'm a total newbie with Kafka Connect, but trying to use it to load some data into Postgres.

My message includes two fields "epochSeconds" and "nanos", however I would like to add a Timestamp column in the database (dropping the nanosecond precision).

So, given the fields

epochSeconds   nanos
1554635349     351025373    

I want to concatenate 1554635349 and 351025, then use the https://docs.confluent.io/current/connect/transforms/timestampconverter.html to convert to a timestamp.

My question is, is it possible to do the concatenation of the (partial) fields, and the conversion of the result, using configuration alone. Or will I have to write some Java code?

Thanks in advance for any advice.

0 个答案:

没有答案