hive 动态分区语句

SET hive.exec.dynamic.partition=true;  
SET hive.exec.max.created.files=300000;
SET hive.exec.dynamic.partition.mode=nonstrict;  
SET hive.exec.max.dynamic.partitions.pernode=5000;  
SET hive.exec.max.dynamic.partitions=5000;
set mapred.job.priority=VERY_HIGH;
insert overwrite table temp.tb1 partition(ds) 
select a.field1,a.field2,a.ds  from temp.tb2 a;
 

 查询最后一个字段保证是分区字段即可。

你可能感兴趣的:(Hive,JAVA学习笔记)