No definitely internal.  It's loaded from an external table.

----- Original Message -----
From: "Furcy Pin" <pin.fu...@gmail.com>
To: user@hive.apache.org
Sent: Thursday, April 5, 2018 9:21:06 AM
Subject: Re: ALTER TABLE DROP PARTITION not working on S3


Hi Richard, 


could you please check if your table is EXTERNAL? 
You can see it with a "DESCRIBE FORMATTED table_name ;" 


That's what external tables are for, they don't delete underlying data when you 
drop them. 




On 5 April 2018 at 15:18, Richard A. Bross < r...@oaktreepeak.com > wrote: 


I think that someone put a file in there manually. Would that prevent Hive from 
dropping the partition. I also did a "drop table" and the s3 object keys 
persisted. 



----- Original Message ----- 
From: "Richard A. Bross" < r...@oaktreepeak.com > 
To: user@hive.apache.org 
Sent: Thursday, April 5, 2018 9:14:52 AM 
Subject: ALTER TABLE DROP PARTITION not working on S3 

Hi, 

I have a Hive managed table on S3, "api_measurements". I've tried dropping a 
partition like so: 

hive> alter table api_measurements drop if exists 
partition(daydate='2018-04-04', epoch=1522876500); 
Dropped the partition daydate=2018-04-04/epoch=1522876500 
OK 
Time taken: 2.109 seconds 

Yet the data is still on S3. Because object keys on S3 are always strings, I 
also tried this: 

hive> alter table api_measurements drop partition(daydate='2018-04-04', 
epoch='1522876500'); 
OK 
Time taken: 0.135 seconds 

Yet the object keys and data are still there. I assume that Im missing 
something really simple. Can anyone shed some light on this? 

Thanks 


Reply via email to