1

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

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Peter
  • 21
  • 3

0 Answers0