-- 源分区表,分区为part CREATE TABLE IF NOT EXISTS co_v2_test( a1 string )partitioned by (part string); insert overwrite table co_v2_test partition(part=‘2016-06-22‘) select ‘1‘ from dual; select * from co_v2_test; -- 目标分区表,与源定义,分区相同 drop table if exists co_v2_test1; CREATE TABLE IF NOT EXISTS co_v2_test1( a1 string )partitioned by (part string); -- 复制方法:insert insert overwrite table co_v2_test1 partition (part) select * from co_v2_test;
时间: 2024-10-12 19:48:28