0
我试图实现动态分区在最近的30个分区更新日期:蜂巢:动态分区
set hive.exec.dynamic.partition=true;
insert overwrite tmp_ol.user_status_aggre partition(`day`)
select
uuid,
uv+(case when b.uuid is not null then 1 else 0 end) as uv,
`date` as `day`
from
(select uuid,uv,`date` from user_status_aggre where `day` between `2017-05-15` and `2017-05-22`) a
left join
(select uuid from tabledemo where `day`='2017-05-22') b
on a.uuid=b.uuid
但我发现了一个错误:
FAILED: ParseException line 1:17 cannot recognize input near 'tmp_ol' '.' 'user_status_aggre' in destination specification
创建查询表如下:
create table tmp_ol.user_status_aggre (
uuid string,
uv string,
`date` date)
PARTITIONED BY (`day` string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
STORED AS textfile;
我想知道是否动态分区不能应用于自己..感谢y我们的帮助。
您似乎忘记在INSERT语句中TABLE关键字。它是INSERT OVERWRITE TABLE PARTITION ... –