hive转16进制unhex_Hive,
Hive,
Hive查詢
1、hive模糊搜索表
show tables like '*name*';
2、查看表結構信息
desc formatted tablename;
desc table_name
3、查看分區信息
show partitions tablename;
4、根據分區查詢數據
select table_coulm from tablename where partitionname = '2016-02-25';
5、 刪除分區
alter table test drop partition(dt='2016-03-01');
alter table test drop partition(dt='2016-01-17')
6、 殺死某個任務 不在hive shell中執行
Hadoop job -kill job_201403041453_58315
7、 hive命令行操作
執行一個查詢,在終端上顯示mapreduce的進度,執行完畢后,最后把查詢結果輸出到終端上,接著hive進程退出,不會進入交互模式。
hive -e 'select table_cloum from table'
-S,終端上的輸出不會有mapreduce的進度,執行完畢,只會把查詢結果輸出到終端上。這個靜音模式很實用,,通過第三方程序調用,第三方程序通過hive的標準輸出獲取結果集。
hive -S -e 'select tablecloum from table'
總結
以上是生活随笔為你收集整理的hive转16进制unhex_Hive,的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据库相关操作
- 下一篇: ABC 215 E - Chain Co