if you put external in the table definition and point  INPATH to hive the
original data(where data is landing from other source  ). then how come
data will come to /user/hive/warehouse. /user/hive/warehouse should only be
populated with data when its 'internal'?

On Tue, Aug 25, 2015 at 7:33 PM, Peyman Mohajerian <mohaj...@gmail.com>
wrote:

> Hi Jeetendra,
>
> What I was originally saying is that if you drop the table, it will
> deleted the data despite the fact that you put 'external' in the
> definition. I think this behavior is due to the fact that data is in
> /user/hive/warehouse and therefore Hive assumes ownership and ignores the
> 'external' directive! I would have assumed 'external' would still carry its
> meaning and dropping the table would not delete the data, but I was wrong.
> If I got this inaccurately please challenge my conclusion.
>
> Thanks,
> Peyman
>
> On Mon, Aug 24, 2015 at 11:22 PM, Jeetendra G <jeetendr...@housing.com>
> wrote:
>
>> Hi Peyman
>>
>> I created a new Hive external table with partition column name of 'yr'
>> instead of 'year' pointing to the same base directory.
>> if this is a case how come /user/hive/warehouse having the data? it
>> should not right?
>>
>> On Tue, Aug 25, 2015 at 4:41 AM, Peyman Mohajerian <mohaj...@gmail.com>
>> wrote:
>>
>>> Hi Guys,
>>>
>>> I managed to delete some data in HDFS by dropping a partitioned external
>>> Hive table. One explanation is that data resided in the 'warehouse'
>>> directory of Hive and that had something to do with?
>>> An alternative explanation may that my 'drop table' statement didn't
>>> delete the data but my follow up 'create table' statement with a different
>>> partition name did. Let me elaborate, files used to be in this directory
>>> structure:
>>> /user/hive/warehouse/<tablename>/year=2009
>>>
>>> I created a new Hive external table with partition column name of 'yr'
>>> instead of 'year' pointing to the same base directory. Is it possible that
>>> this create statement deleted the data (highly doubt that)? Either case
>>> were unexpected to me!
>>>
>>> This is on Hive 1.0.
>>>
>>> Thanks,
>>> Peyman
>>>
>>
>>
>

Reply via email to