Hive Drop 外表,同時刪除數據

將外表的清除屬性設置爲 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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章