Drop table feature

The syntax you use to create the table determines the default behavior when you drop the Iceberg table from Hive or Impala.

If you use CREATE TABLE, the external.table.purge flag is set to true. When the table is dropped then the contents of the table directory (actual data) is removed. If you use CREATE EXTERNAL TABLE from Hive, the external.table.purge flag is set to false. Dropping a table purges the schema only. The actual data is not removed. You can explicitly set the external.table.purge property to true to change the default behavior to drop the data as well as the schema, or to not drop the data.

Hive or Impala syntax

DROP TABLE [IF EXISTS] table_name

Hive or Impala example

ALTER TABLE t SET TBLPROPERTIES('external.table.purge'='true');

DROP TABLE t;