Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of PURGE in DROP statement of Hive?

Tags:

hive

purge

Hi Please describe the difference between both in hive with example.

like image 804
Gaurav Gangwar Avatar asked Aug 09 '18 19:08

Gaurav Gangwar


Video Answer


1 Answers

DROP TABLE [IF EXISTS] table_name [PURGE];

If you don't use purge the table goes to a Trash directory, from there the table can be recovered after drop it. But if you do use purge table won't go to Trash directory, so it can't be recovered.

Regards !!

like image 197
juamd Avatar answered Dec 04 '22 06:12

juamd