在avro中声明简单时间戳的正确方法是什么

wgxvkvu9  于 2021-06-24  发布在  Hive
关注(0)|答案(1)|浏览(405)

我们如何在avro中声明一个简单的时间戳。
type:timestamp doesnt 工作。所以我实际上使用了一个简单的字符串,但我希望它作为时间戳(这是我的变量:27/01/1999 08:45:34)
谢谢您

bxjv4tth

bxjv4tth1#

使用avro的逻辑类型:

{"name":"timestamp","type": {"type": "string", "logicalType": "timestamp-millis"}

一些有用的链接:
avro时间戳毫秒
avro逻辑类型
关于avro时间戳的hortonworks社区问题

相关问题