Hive 复制表结构和数据

1. 复制非分区表

create table a as select * from b;

2. 复制分区表

create table a like b;
insert overwrite table a partition (year, month, day) select * from b;