You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Sanjay Subramanian <Sa...@wizecommerce.com> on 2013/06/12 00:16:42 UTC

Renaming partition columnname only (locations remain unchanged)

Hi
I have external tables where I want to change the name of the partition column, locations remaining constant
Is there a way to do this…Else I will drop and create the table with new partition column names and run my scripts to ADD PARTITION, with LOCATION specified
Thanks
sanjay

CONFIDENTIALITY NOTICE
======================
This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.

Re: Renaming partition columnname only (locations remain unchanged)

Posted by Sanjay Subramanian <Sa...@wizecommerce.com>.
Alter table rename partition column does not recognize the column name. It's ok I dropped the table and created a new one and executed ADD PARTITION. and provided LOCATION
Sanjay

Sent from my iPhone

On Jun 12, 2013, at 9:53 AM, "Stephen Sprague" <sp...@gmail.com>> wrote:

all you have to do is create a partitioned test table and run an alter table command to rename the partition column(s) - and see what happens.

That's about as simple as it gets.  It either works or it doesn't. :)


On Tue, Jun 11, 2013 at 9:50 PM, Nitin Pawar <ni...@gmail.com>> wrote:
currently hive partitions on hdfs stored as col1=val1/col2=val2

looking at this if you change the column name in the metadata, I am not sure you will be able to locate the data with old column name. other way would be alter table and and run hdfs move to reflect your new column name in the partition directories on hdfs.

It looks much simpler to just create new table and dump the old one via hive though


On Wed, Jun 12, 2013 at 3:46 AM, Sanjay Subramanian <Sa...@wizecommerce.com>> wrote:
Hi
I have external tables where I want to change the name of the partition column, locations remaining constant
Is there a way to do this…Else I will drop and create the table with new partition column names and run my scripts to ADD PARTITION, with LOCATION specified
Thanks
sanjay

CONFIDENTIALITY NOTICE
======================
This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.



--
Nitin Pawar


CONFIDENTIALITY NOTICE
======================
This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.

Re: Renaming partition columnname only (locations remain unchanged)

Posted by Stephen Sprague <sp...@gmail.com>.
all you have to do is create a partitioned test table and run an alter
table command to rename the partition column(s) - and see what happens.

That's about as simple as it gets.  It either works or it doesn't. :)


On Tue, Jun 11, 2013 at 9:50 PM, Nitin Pawar <ni...@gmail.com>wrote:

> currently hive partitions on hdfs stored as col1=val1/col2=val2
>
> looking at this if you change the column name in the metadata, I am not
> sure you will be able to locate the data with old column name. other way
> would be alter table and and run hdfs move to reflect your new column name
> in the partition directories on hdfs.
>
> It looks much simpler to just create new table and dump the old one via
> hive though
>
>
> On Wed, Jun 12, 2013 at 3:46 AM, Sanjay Subramanian <
> Sanjay.Subramanian@wizecommerce.com> wrote:
>
>>    Hi
>>   I have external tables where I want to change the name of the
>> partition column, locations remaining constant
>> Is there a way to do this…Else I will drop and create the table with new
>> partition column names and run my scripts to ADD PARTITION, with LOCATION
>> specified
>> Thanks
>> sanjay
>>
>> CONFIDENTIALITY NOTICE
>> ======================
>> This email message and any attachments are for the exclusive use of the
>> intended recipient(s) and may contain confidential and privileged
>> information. Any unauthorized review, use, disclosure or distribution is
>> prohibited. If you are not the intended recipient, please contact the
>> sender by reply email and destroy all copies of the original message along
>> with any attachments, from your computer system. If you are the intended
>> recipient, please be advised that the content of this message is subject to
>> access, review and disclosure by the sender's Email System Administrator.
>>
>
>
>
> --
> Nitin Pawar
>

Re: Renaming partition columnname only (locations remain unchanged)

Posted by Nitin Pawar <ni...@gmail.com>.
currently hive partitions on hdfs stored as col1=val1/col2=val2

looking at this if you change the column name in the metadata, I am not
sure you will be able to locate the data with old column name. other way
would be alter table and and run hdfs move to reflect your new column name
in the partition directories on hdfs.

It looks much simpler to just create new table and dump the old one via
hive though


On Wed, Jun 12, 2013 at 3:46 AM, Sanjay Subramanian <
Sanjay.Subramanian@wizecommerce.com> wrote:

>    Hi
>   I have external tables where I want to change the name of the partition
> column, locations remaining constant
> Is there a way to do this…Else I will drop and create the table with new
> partition column names and run my scripts to ADD PARTITION, with LOCATION
> specified
> Thanks
> sanjay
>
> CONFIDENTIALITY NOTICE
> ======================
> This email message and any attachments are for the exclusive use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact the
> sender by reply email and destroy all copies of the original message along
> with any attachments, from your computer system. If you are the intended
> recipient, please be advised that the content of this message is subject to
> access, review and disclosure by the sender's Email System Administrator.
>



-- 
Nitin Pawar