Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive skip trash while doing insert overwrite on an external table

Highlighted

Hive skip trash while doing insert overwrite on an external table

New Contributor

I am trying to skip the trash while doing insert overwrite on an external table from hive.

 

Tried using :

 

SET hive.warehouse.data.skiptrash=true;

 

ALTER TABLE TABLE_NAME DROP IF EXISTS partition(partition_value) PURGE;

 

Is there any alternative command from HIVE other than a hard delete on HDFS?

5 REPLIES 5

Re: Hive skip trash while doing insert overwrite on an external table

Champion

the other way around is to use em in  Table properties , i belive it holds true for managed table . 

not sure for external table , please try it let me know if you can . 

 

TBLPROPERTIES ("auto.purge"="true") or ("auto.purge"="false") in release 1.2.0

 

Highlighted

Re: Hive skip trash while doing insert overwrite on an external table

New Contributor

Yes, this does not work even for managed tables, there is some bug logged.

Highlighted

Re: Hive skip trash while doing insert overwrite on an external table

Champion

i belive you are pointing this

HIVE-9118

its been fixed .

 hive  1.2.0 
Highlighted

Re: Hive skip trash while doing insert overwrite on an external table

Explorer

Am I right in reading the 5.13.3 and 5.14.2 tarball components? They both use Hive 1.1.0 and not Hive 1.2.0

 

I have a very similar problem - I want to switch off hive using the trash for certain tables

Highlighted

Re: Hive skip trash while doing insert overwrite on an external table

Explorer

Is ther any solution for this issue. I am facing same issue. Table is holding very huge data and while doing insert overwrite , files are getting placed in my user directory, /user/anjali/.Trash, causing hive action in oozie to fail after 1.5 hr long run. Please help. The table is external and ev even I changed it to internal table, auto purge = true is not working.

Don't have an account?
Coming from Hortonworks? Activate your account here