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

Gaurav Gangwar picture Gaurav Gangwar · Aug 9, 2018 · Viewed 9.7k times · Source

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

Answer

juamd picture juamd · Aug 11, 2018

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 !!