You can change your table to external first and then drop it:

ALTER TABLE my_table SET TBLPROPERTIES ('EXTERNAL'='FALSE');

Please test it on an unimportant table first.


From: Igor Tatarinov [mailto:i...@decide.com]
Sent: Tuesday, January 24, 2012 3:55 PM
To: user@hive.apache.org
Subject: dropping an "external" table without deleting the data

I keep making the same mistake of creating an external table without saying 
"EXTERNAL". As a result, as you can imagine, I am stuck with a table that I 
cannot drop or I'll lose the external (S3) data. I end up terminating my EMR 
instance and creating a new one to avoid dropping the table accidentally.

Is there a way to drop a "should-be-external" table without losing the data? 
Thru mysql perhaps?

Thanks!
igor


Reply via email to