作者官方网站:http://www.wxl568.cn
查看表结构
desc formatted inc_ubas.ods_product_inc_ubas_hrss_clock;
hive查询日期格式实例如下
WHERE day(L.clock_time) =day('2017-12-24') and L.inc_day='20171224'
from_unixtime(cast(time/1000 as bigint), 'yyyy-MM-dd')='${yyyymmdd}'
hive查询显示如下
from_unixtime(cast(time/1000 as bigint)) as date_time
from_unixtime(time,'yyyy-MM-dd HH:mm:ss')
from_unixtime(cast(time/1000 as bigint), 'yyyy-MM-dd')='${yyyymmdd}'