hive批量刪除表
#!/bin/shhive -e "use csxuy;show tables;"|grep product_tour2 | while read linedoecho -n "drop table ...
#!/bin/shhive -e "use csxuy;show tables;"|grep product_tour2 | while read linedoecho -n "drop table ...
...
一.批量添加分區: use bigdata; alter table siebel_member add if not exists partition(dt='20180401') location '20180401 ...
...
第一步:執行 select 'drop table '||table_name||';' as sqlscript from user_tables; 第二部:導出所有的執行結果,生成exc ...
今天需要清理一個很大的數據庫,里面表有一堆,而且有很多是空表。想着把數據庫弄小點,於是想到一次性刪掉所有空表。 廢話不多說,上代碼。 首先,查處所有的空表。 View Code 然后把查詢的表名拼成drop table的語句 ...
hive刪除表和表中的數據,以及按分區刪除數據 hive刪除表: hive刪除表中數據: hive按分區刪除數據: ...