hive of data modification

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 cover

So, use the insert overwrite table rather than insert into table

Published 120 original articles · won praise 35 · views 170 000 +

Guess you like

Origin blog.csdn.net/u012328476/article/details/80450016