简体   繁体   中英

How to load a particular partition of a Hive table into another Hive table with no partitions?

HiveTable1 has columns name, email in partition date=12/12/2014 There are other date partitions in the table as well.

HiveTable2 is created with name, email columns.

How do I transfer the data from HiveTable1 to HiveTable2?

If you just filter on a single value for the partition key then it will only load that partition.

INSERT INTO TABLE HiveTable2
SELECT name, email FROM HiveTable1 WHERE date="12/12/2014";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM