hive表想使用动态分区的方法,insert overwrite 的时候,必须把动态分区字段放在select 的字段最后面。好多中文帖子写的都不对!坑人
On the other hand, if you used dynamic partitioning -- i.e.
INSERT ... PARTITION (country)
with no literal value -- then the actual value for the partitioning "column" would have to be fed as an extra column in SELECT, after the real columns.