hive端测试
--hive端建表
create table tb_log(
log string
)
partitifirstd by (dt string)
;
load data local inpath '/root/event.log' into table tb_log partition (dt='20201007');
--解析json数据,并对数据进行预处理
create table tb_ods_log as
select
if(account='',deviceId,account) as guid,
*
from
(select
json_tuple(
log,
'account' ,'appId' ,'appVersion','carrier','deviceId','deviceType','eventId','ip','latitude','longitude','netType','osName','osVersion','properties','releaseChannel','resolution','sessionId' ,'timeStamp')
as
(account
最低0.47元/天 解锁文章
8799

被折叠的 条评论
为什么被折叠?



