Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Changing table types from managed to external

Copy link to this message
Re: Changing table types from managed to external
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,

On Tue, Aug 7, 2012 at 8:13 AM, long <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> 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