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
hive-0
最新推荐文章于 2021-11-24 19:52:38 发布