gpt4 book ai didi

hadoop - Hive - 面临动态分区错误的挑战

转载 作者:可可西里 更新时间:2023-11-01 16:32:12 26 4
gpt4 key购买 nike

任何人都可以指导我在进行动态分区时哪里出错了。

--暂存表:

    create table staging_peopledata
(
firstname string,
secondname string,
salary float,
country string
state string
)
row format delimited fields terminated by ',' lines terminated by '\n';

--暂存表的数据:

    John,David,30000,RUS,tnRUS
John,David,30000,RUS,tnRUS
Mary,David,5000,AUS,syAUS
Mary,David,5000,AUS,syAUS
Mary,David,5000,AUS,weAUS
Pierre,Cathey,6000,RUS,kaRUS
Pierre,Cathey,6000,RUS,kaRUS
Ahmed,Talib,11000,US,bcUS
Ahmed,Talib,11000,US,onUS
Ahmed,Talib,11000,US,onUS
kris,David,80000,UK,lnUK
kris,David,80000,UK,soUK

--生产表:

    create table Production_peopledata
(
firstname string,
lastname string,
salary float)
partitioned by (country string, state string)
row format delimited fields terminated by ',' lines terminated by '\n';

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

insert overwrite table Production_peopledata
partition(country,state)
select firstname, secondname, salary, country, state from staging_peopledata;

如果我执行上面的命令,我会收到如下错误。

    FAILED: SemanticException [Error 10096]: Dynamic partition strict mode
requires atleast one static partition column. To turn this off set
hive.exec.dynamic.partition.mode=nonstrict

谁能告诉我我哪里做错了。

最佳答案

能否在 Hive Shell 上运行以下命令。

hive>set hive.exec.dynamic.partition.mode=nonstrict;

关于hadoop - Hive - 面临动态分区错误的挑战,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25514018/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com