You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Babe Ruth <gt...@hotmail.com> on 2012/08/07 08:08:09 UTC
Changing table types from managed to external
Hello, I created a managed table in HIVE when i intended for it to be external, is it possible for me to change the table back to external?
OR do I have to copy the data to a new directory, drop the table, then copy it back?
Thanks,George
RE: Changing table types from managed to external
Posted by Babe Ruth <gt...@hotmail.com>.
Thanks Igor! It worked!
Date: Mon, 6 Aug 2012 23:26:04 -0700
Subject: Re: Changing table types from managed to external
From: igor@decide.com
To: user@hive.apache.org
CC: dev@hive.apache.org
TryALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE');
It worked for me.
igordecide.com
On Mon, Aug 6, 2012 at 11:08 PM, Babe Ruth <gt...@hotmail.com> wrote:
Hello, I created a managed table in HIVE when i intended for it to be external, is it possible for me to change the table back to external?
OR do I have to copy the data to a new directory, drop the table, then copy it back?
Thanks,George
RE: Changing table types from managed to external
Posted by Babe Ruth <gt...@hotmail.com>.
Thanks Igor! It worked!
Date: Mon, 6 Aug 2012 23:26:04 -0700
Subject: Re: Changing table types from managed to external
From: igor@decide.com
To: user@hive.apache.org
CC: dev@hive.apache.org
TryALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE');
It worked for me.
igordecide.com
On Mon, Aug 6, 2012 at 11:08 PM, Babe Ruth <gt...@hotmail.com> wrote:
Hello, I created a managed table in HIVE when i intended for it to be external, is it possible for me to change the table back to external?
OR do I have to copy the data to a new directory, drop the table, then copy it back?
Thanks,George
Re: Changing table types from managed to external
Posted by Igor Tatarinov <ig...@decide.com>.
Try
ALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE');
It worked for me.
igor
decide.com
On Mon, Aug 6, 2012 at 11:08 PM, Babe Ruth <gt...@hotmail.com>wrote:
> Hello,
> I created a managed table in HIVE when i intended for it to be external,
> is it possible for me to change the table back to external?
>
> OR do I have to copy the data to a new directory, drop the table, then
> copy it back?
>
>
> Thanks,
> George
>
Re: Changing table types from managed to external
Posted by Igor Tatarinov <ig...@decide.com>.
Try
ALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE');
It worked for me.
igor
decide.com
On Mon, Aug 6, 2012 at 11:08 PM, Babe Ruth <gt...@hotmail.com>wrote:
> Hello,
> I created a managed table in HIVE when i intended for it to be external,
> is it possible for me to change the table back to external?
>
> OR do I have to copy the data to a new directory, drop the table, then
> copy it back?
>
>
> Thanks,
> George
>
Re: Changing table types from managed to external
Posted by Jan DolinĂ¡r <do...@gmail.com>.
Hi George,
You can save yourself one copying. Just create a new external table with
different name, fill it with data (either by copying or query like INSERT
OVERWRITE DIRECTORY '/new/table/path' SELECT * FROM oldtable), drop the old
one and then rename the new one to the desired name:
ALTER TABLE table_name RENAME TO new_table_name;
Best regards,
Jan
On Tue, Aug 7, 2012 at 8:13 AM, long <lo...@163.com> wrote:
> Hi, George,
> I think that's the only way you can do now.
>
> --
> Best Regards,
> longmans
>
> At 2012-08-07 14:08:09,"Babe Ruth" <gt...@hotmail.com> wrote:
>
> Hello,
> I created a managed table in HIVE when i intended for it to be external,
> is it possible for me to change the table back to external?
>
> OR do I have to copy the data to a new directory, drop the table, then
> copy it back?
>
>
> Thanks,
> George
>
>
>
>
Re:Changing table types from managed to external
Posted by long <lo...@163.com>.
Hi, George,
I think that's the only way you can do now.
--
Best Regards,
longmans
At 2012-08-07 14:08:09,"Babe Ruth" <gt...@hotmail.com> wrote:
Hello,
I created a managed table in HIVE when i intended for it to be external, is it possible for me to change the table back to external?
OR do I have to copy the data to a new directory, drop the table, then copy it back?
Thanks,
George