beeline的常用命令小结
本篇內(nèi)容主要講解“beeline的常用命令小結(jié)”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“beeline的常用命令小結(jié)”吧!
<ol start="1" white-space:normal;margin:0px 0px 1px 45px !important;padding-top:0px !important;padding-right:0px !important;padding-bottom:0px !important;">
-
<span>Beeline和其他工具有一些不同,執(zhí)行查詢都是正常的SQL輸入,但是如果是一些管理的命令,
-
比如進(jìn)行連接,中斷,退出,執(zhí)行Beeline命令需要帶上“!”,不需要終止符。常用命令介紹:
-
1、!connecturl–連接不同的Hive2服務(wù)器
-
2、!exit–退出shell
-
3、!help–顯示全部命令列表
-
4、!verbose–顯示查詢追加的明細(xì)
-
TheBeelineCLI支持以下命令行參數(shù):
-
Option
-
Description
-
--autoCommit=[true/false]---進(jìn)入一個自動提交模式:beeline--autoCommit=true
-
--autosave=[true/false]---進(jìn)入一個自動保存模式:beeline--autosave=true
-
--color=[true/false]---顯示用到的顏色:beeline--color=true
-
--delimiterForDSV=DELIMITER---分隔值輸出格式的分隔符。默認(rèn)是“|”字符。
-
--fastConnect=[true/false]---在連接時,跳過組建表等對象:beeline--fastConnect=false
-
--force=[true/false]---是否強(qiáng)制運(yùn)行腳本:beeline--force=true
-
--headerInterval=ROWS---輸出的表間隔格式,默認(rèn)是100:beeline--headerInterval=50
-
--help---幫助beeline--help
-
--hiveconfproperty=value---設(shè)置屬性值,以防被hive.conf.restricted.list重置:beeline--hiveconfprop1=value1
-
--hivevarname=value---設(shè)置變量名:beeline--hivevarvar1=value1
-
--incremental=[true/false]---輸出增量
-
--isolation=LEVEL---設(shè)置事務(wù)隔離級別:beeline--isolation=TRANSACTION_SERIALIZABLE
-
--maxColumnWidth=MAXCOLWIDTH---設(shè)置字符串列的最大寬度:beeline--maxColumnWidth=25
-
--maxWidth=MAXWIDTH---設(shè)置截?cái)鄶?shù)據(jù)的最大寬度:beeline--maxWidth=150
-
--nullemptystring=[true/false]---打印空字符串:beeline--nullemptystring=false
-
--numberFormat=[pattern]---數(shù)字使用DecimalFormat:beeline--numberFormat="#,###,##0.00"
-
--outputformat=
---輸出格式:beeline--outputformat=tsv -
--showHeader=[true/false]---顯示查詢結(jié)果的列名:beeline--showHeader=false
-
--showNestedErrs=[true/false]---顯示嵌套錯誤:beeline--showNestedErrs=true
-
--showWarnings=[true/false]---顯示警告:beeline--showWarnings=true
-
--silent=[true/false]---減少顯示的信息量:beeline--silent=true
-
--truncateTable=[true/false]---是否在客戶端截?cái)啾淼牧?/p>
-
--verbose=[true/false]---顯示詳細(xì)錯誤信息和調(diào)試信息:beeline--verbose=true
-
-d<driverclass>---使用一個驅(qū)動類:beeline-ddriver_class
-
-e<query>---使用一個查詢語句:beeline-e"query_string"
-
-f<file>---加載一個文件:beeline-ffilepath多個文件用-efile1-efile2
-
-n<username>---加載一個用戶名:beeline-nvalid_user
-
-p<password>---加載一個密碼:beeline-pvalid_password
-
-u<databaseURL>---加載一個JDBC連接字符串:beeline-udb_URL
總結(jié)
以上是生活随笔為你收集整理的beeline的常用命令小结的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 怎么用indirect函数
- 下一篇: 电脑中如何给固态硬盘分区