首先須要進行如下設置:node
set hive.exec.dynamic.partition=true; spa
set hive.exec.dynamic.partition.mode=nonstrict; code
set hive.exec.max.dynamic.partitions.pernode=10000;blog
動態插入語法 :it
insert overwrite table tb_test (biz_date) select col_a, col_b, ..... col_last, col_date --這個字段不是實際插入到表中的哦,只是用來標識根據此字段的值來插入到不一樣的分區中 from tb_test0