You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ashish Garg <ga...@gmail.com> on 2014/05/31 05:45:39 UTC

ManagedTablePartition

Hello all,
Can we create the partitioned table in managed table and can we specify the
location other than default warehouse directory? If yes, then what is the
benefit of external table. Is it just dropping the external table will not
delete the entire data that is it will only delete the metadata. Is this
the only benefit?
Thanks and Regards,
Ashish Garg

Re: ManagedTablePartition

Posted by Edward Capriolo <ed...@gmail.com>.
Answers:
Yes.
Yes.

create table x. ....;
alter table x add partition (...) location '/wherever/your/want'

^ data dropped on delete.

create EXTERNAL table x. ....;
alter table x add partition (...) location '/wherever/your/want'

^ data NOT dropped on delete.




On Fri, May 30, 2014 at 11:45 PM, Ashish Garg <ga...@gmail.com>
wrote:

> Hello all,
> Can we create the partitioned table in managed table and can we specify
> the location other than default warehouse directory? If yes, then what is
> the benefit of external table. Is it just dropping the external table will
> not delete the entire data that is it will only delete the metadata. Is
> this the only benefit?
> Thanks and Regards,
> Ashish Garg
>