我正在尝试使用以下代码在配置单元中创建动态分区。
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;
其中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} 包含非分区列。
有人能建议为什么会出现这个错误吗?
您插入的sql有geo_country_P
列,但目标表列名称是geo_coutry_P
。错过一个n in country
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)