… And you may want to double check your table properties using:
describe formatted <YourTableName>;

/Jerome

From: Steven Wong <sw...@netflix.com<mailto:sw...@netflix.com>>
Reply-To: <user@hive.apache.org<mailto:user@hive.apache.org>>
Date: Wed, 25 Jan 2012 00:27:26 +0000
To: "user@hive.apache.org<mailto:user@hive.apache.org>" 
<user@hive.apache.org<mailto:user@hive.apache.org>>
Subject: RE: dropping an "external" table without deleting the data

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<mailto: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