confluentinc / avro

Mirror of Apache Avro
Apache License 2.0
12 stars 20 forks source link

Avro Timestamp #20

Open elabbassiwidad opened 4 years ago

elabbassiwidad commented 4 years ago

Hello, for my master thesis project, i'm generating mock data using kafka-connect and avro schema, but the timestamp field in kafka is generated in this way/Unix epoch i suppose: 8203758334795633000 with 19 digits, and some values are negative. I tried to convert it using transforms=TimestampConverter but then i get this : "174673355-10-23 23:41:30.000228" , how can I generate normal timestamps I can deal with ?

This how i defined timestamp in avro schema: { "name": "Timestamp", "type": "long", "logicalType": "timestamp-millis" }