Table VS outside the inner table
When Hive create an internal table, data is moved to the path point to the data warehouse; if create an external table, where the only path data recording, the position data does not make any changes. When you delete a table, an internal table metadata and data will be deleted together,The external table deletes only the metadata, do not delete the data. Such external table relatively more safer, more flexible organization of data to facilitate the sharing of source data.
Therefore, it is recommended to create an external table
Delete partition
Delete partitions, the underlying data is not deleted, it is necessary to coverSo, use the insert overwrite table rather than insert into table