0

My kafka message has multiple fields which contain epoch timestamps in long format. My message looks like this :

{
    "someDate1":1512725505000,
    "someDate2":1518060461000,
    "ABC":"XYZ",
    "PQR":"MNO"
}

Is there a way to convert all these epoch timestamps to date time format when loading into hdfs using some property in the camus properties file.

Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92
coder_r
  • 90
  • 2
  • 11

1 Answers1

0

Camus is depreciated - you're better off using the HDFS connector for Kafka Connect. It is open source and available standalone or as part of Confluent Platform.

As part of Kafka Connect you have Single Message Transforms, which you can use to convert your epochs to a more readable form - see org.apache.kafka.connect.transforms.TimestampConverter

See more an example of Single Message Transform in action in this blog article here.

Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92