How to convert Java timestamp stored as bigint to timestamp in Presto?

前端 未结 2 1022
一向
一向 2021-01-20 08:13

I\'ve had little luck searching for this over a couple days.

If my avro schema for data in a hive table is:

{
  \"type\" : \"record\",
  \"name\" : \         


        
2条回答
  •  不要未来只要你来
    2021-01-20 09:02

    select from_unixtime(cast(event_time as bigint) / 1000000) + parse_duration(cast((cast(event_time as bigint) % 1000) as varchar) || 'ms') from TableName limit 10;

提交回复
热议问题