Best way to duplicate a partitioned table in Hive
A simple google search for the above will land you here:
http://grokbase.com/t/hive/user/097w0bsnne/best-way-to-duplicate-a-table
But, I believe a better way is:
- Create the new target table with the schema from the old table
- Use hadoop fs -cp to copy all the partitions from source to target table
- Run MSCK REPAIR TABLE table_name; on the target table