Hive 基本操作-Partition(分區)


1)添加分區
alter table bst_bas_hailing_order add if not exists partition(dt_year='${v_dt_year}');
2)刪除分區
alter table bst_bas_hailing_order drop if exists partition(dt_year='${v_dt_year}');
3)  查看分區
show partitions bst_bas_hailing_order;
4)修復分區
msck repair table bst_bas_hailing_order;
一般用在外部表,新建的表需要添加對應分區的時候,直接使用修復分區。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM