栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Hive写sql脚本删除指定表

Hive写sql脚本删除指定表

脚本:drop_all_table.sql

drop table to_client_song_play_operate_req_d;
drop table to_song_info_d;
drop table tw_singer_rsi_d;
drop table tw_song_baseinfo_d;
drop table tw_song_ftur_d;
drop table tw_song_rsi_d;

执行脚本

[root@node4 ~]# hive -f ./drop_all_table.sql 

Logging initialized using configuration in jar:file:/opt/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
OK
Time taken: 3.101 seconds
OK
Time taken: 0.185 seconds
OK
Time taken: 0.313 seconds
OK
Time taken: 0.35 seconds
OK
Time taken: 0.302 seconds
OK
Time taken: 0.386 seconds

查看对比

hive> show tables;
OK
browser
event_logs
hbasetbl
stats_view_depth
stats_view_depth_tmp
tmp_order
to_client_song_play_operate_req_d
to_song_info_d
tw_singer_rsi_d
tw_song_baseinfo_d
tw_song_ftur_d
tw_song_rsi_d
Time taken: 0.054 seconds, Fetched: 12 row(s)
hive> select * from TW_SONG_baseINFO_D limit 10;
FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'TW_SONG_baseINFO_D'
hive> show tables;
OK
browser
event_logs
hbasetbl
stats_view_depth
stats_view_depth_tmp
tmp_order
Time taken: 0.033 seconds, Fetched: 6 row(s)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/674145.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号