hive-0

hive> create table employees2 (
    >     name string,
    >     slalary float,
    >     suboddinates array<string>,
    >     deductions map<string,float>,
    >     address struct<stree:string, city:string, state:string, zip:int>
    > )
    > partitioned by(country string, state string);
OK
Time taken: 0.089 seconds
hive> insert into table employees2 
    > partition (country,state)
    > select name,slalary,suboddinates,deductions,address, e.country, e.state
    > from employees e;
FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict
hive> set hive.exec.dynamic.partition.mode=nonstrict;
hive> insert into table employees2                                           
    > partition (country,state)
    > select name,slalary,suboddinates,deductions,address, e.country, e.state
    > from employees e;
Total MapReduce jobs = 3
Launching Job 1 out of 3
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1465534936768_0001, Tracking URL = http://localhost:8088/proxy/application_1465534936768_0001/
Kill Command = /usr/local/hadoop/bin/hadoop job  -kill job_1465534936768_0001
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
2016-06-10 00:53:09,854 Stage-1 map = 0%,  reduce = 0%
2016-06-10 00:53:31,630 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 1.39 sec
2016-06-10 00:53:32,671 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 1.39 sec
MapReduce Total cumulative CPU time: 1 seconds 390 msec
Ended Job = job_1465534936768_0001
Stage-4 is selected by condition resolver.
Stage-3 is filtered out by condition resolver.
Stage-5 is filtered out by condition resolver.
Moving data to: hdfs://name01:9000/tmp/hive-root/hive_2016-06-10_00-52-16_496_7226089116519470858-1/-ext-10000
Loading data to table default.employees2 partition (country=null, state=null)
	Loading partition {country=us, state=ca}
Partition default.employees2{country=us, state=ca} stats: [num_files: 1, num_rows: 0, total_size: 525, raw_data_size: 0]
Table default.employees2 stats: [num_partitions: 1, num_files: 1, num_rows: 0, total_size: 525, raw_data_size: 0]
MapReduce Jobs Launched: 
Job 0: Map: 1   Cumulative CPU: 1.39 sec   HDFS Read: 705 HDFS Write: 525 SUCCESS
Total MapReduce CPU Time Spent: 1 seconds 390 msec
OK
name	slalary	suboddinates	deductions	address	country	state
Time taken: 76.832 seconds
hive> 
ok
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

5icode.top

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值