小编rup*_*ali的帖子

SemanticException 分区规范 {col=null} 包含非分区列

我正在尝试使用以下代码在配置单元中创建动态分区。

SET hive.exec.dynamic.partition = true;
SET hive.exec.dynamic.partition.mode = nonstrict;

create external table if not exists report_ipsummary_hourwise(
ip_address string,imp_date string,imp_hour bigint,geo_country string)
PARTITIONED BY (imp_date_P string,imp_hour_P string,geo_coutry_P string) 
row format delimited 
fields terminated by '\t'
stored as textfile
location 's3://abc';

insert overwrite table report_ipsummary_hourwise PARTITION (imp_date_P,imp_hour_P,geo_country_P)
SELECT ip_address,imp_date,imp_hour,geo_country,
       imp_date as imp_date_P,
       imp_hour as imp_hour_P,
       geo_country as geo_country_P
FROM report_ipsummary_hourwise_Temp;
Run Code Online (Sandbox Code Playgroud)

其中report_ipsummary_hourwise_Temp 表包含以下列:ip_address、imp_date、imp_hour、geo_country。

我收到这个错误

SemanticException 分区规范 {imp_hour_p=null, imp_date_p=null, geo_country_p=null} 包含非分区列。

有人能建议为什么会出现这个错误吗?

hive partitioning dynamic

6
推荐指数
1
解决办法
3万
查看次数

标签 统计

dynamic ×1

hive ×1

partitioning ×1