Hi Raj

1.       I don’t understand the reason for this change, can you please 
elaborate?



2.       External table is just an interface. Instructions for how to read 
existing data.

Partitions of external table are just a logical connections between certain 
values and a specific directories.

You can connect any set of values to any directory no matter what the 
directories structure is and then query the external table filtering on this 
values and by that eliminating the query only to the directories you are 
interested in.



3.       By all means, don’t duplicate data without a good reason (unless you 
don’t care about wasting storage, time, CPU etc.)

It seems to me that all you need to do is to retrieve a list of the directories 
and generate “alter table … add partition…” statements based on that.


Dudu

From: raj hive [mailto:raj.hiv...@gmail.com]
Sent: Monday, June 06, 2016 6:02 AM
To: user@hive.apache.org
Subject: alter partitions on hive external table

Hi friends,
I have created partitions on hive external tables. partitions on 
datetime/userid/customerId.
now i have to change the order of the partitions for the existing data for all 
the dates.
order of the partition is custerid/userid/datetime.
Anyone can help me, how to alter the partitions for the existing table. Need a 
help to write a script to change the partions on existing data. almost 3 months 
data is there to modify as per new partition so changing each date is 
difficult. Any expert can help me.
Thanks
Raj

Reply via email to