1
我使用sqoop將avro文件格式導入選定列的表。使用avro-tools來日期顯示爲奇怪的格式(negetive)。我如何解碼日期?Avro tojson日期格式
{"first_name":{"string":"Mary"},"last_name": {"string":"Botman"},"birth_date":{"long":-345772800000}}
其中如MySQL查詢擊掌正確格式
mysql> select first_name, last_name, birth_date from employees where first_name like 'Mary' and last_name ='Botman';
+------------+-----------+------------+
| first_name | last_name | birth_date |
+------------+-----------+------------+
| Mary | Botman | 1959-01-17 |
+------------+-----------+------------+
1 row in set (0.07 sec)