將外表的清除屬性設置爲 true
就可以在 drop
的時候清除外表的數據,無需手動刪除了。
ALTER TABLE addresses_text SET TBLPROPERTIES ('external.table.purge'='true');
參考
https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/using-hiveql/content/hive_drop_external_table_data.html
將外表的清除屬性設置爲 true
就可以在 drop
的時候清除外表的數據,無需手動刪除了。
ALTER TABLE addresses_text SET TBLPROPERTIES ('external.table.purge'='true');
https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/using-hiveql/content/hive_drop_external_table_data.html