2 years ago
#31742
Peter
timestamps microsecond precision is reset to 000 when kafka deserializes data to create sql insert (?)
Using avro schema for data; have a field for timestamp named 'time' and its like this:
{"name": "time", "type": {"type": "long", "logicalType": "timestamp-micros"}},
The timestamp-micros could alternatively be timestamp-millis but I want microseconds included that's why I chose this.
What is passed on here is :
{'time': datetime.datetime(2022, 1, 10, 6, 52, 53, 511281, tzinfo=)}
The problem is when this is deserialized I get something like
2022, 1, 10, 6, 52, 53, 511000 inserted into the database. This is shaving off the micros. What is this related to?
What this is matched with
postgresql
apache-kafka-connect
timestamp-with-timezone
fastavro
0 Answers
Your Answer