hive-beeline



Hive Beeline



hive-beeline

https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients。

転載

Beelineと他のツールの間にはいくつかの違いがあります。クエリの実行は通常のSQL入力ですが、一部の管理コマンドの場合は、



たとえば、接続、割り込み、終了、「!」を指定したBeelineコマンドの実行には、ターミネータは必要ありません。一般的なコマンドの紹介:

1, connect url – connect different Hive2 servers 2, !exit - exit the shell 3, !help - display a list of all commands 4, !verbose – shows the details of the query addition The Beeline CLI supports the following command line parameters: --autoCommit=[true/false] --- Enter an autocommit mode: beeline --autoCommit=true --autosave=[true/false] --- Enter an automatic save mode: beeline --autosave=true --color=[true/false] --- Display the color used: beeline --color=true --delimiterForDSV= DELIMITER --- Separator for the format of the output value. The default is the '|' character. --fastConnect=[true/false] ---When connecting, skip objects such as table construction: beeline --fastConnect=false --force=[true/false] --- Whether to force the script to run: beeline--force=true --headerInterval=ROWS --- Output table interval format, the default is 100: beeline --headerInterval=50 --help ---help beeline --help --hiveconf property=value ---Set the property value in case it is reset by hive.conf.restricted.list:beeline --hiveconf prop1=value1 --hivevar name=value ---Set the variable name: beeline --hivevar var1=value1 --incremental=[true/false] ---Output increment --isolation=LEVEL ---Set transaction isolation level: beeline --isolation=TRANSACTION_SERIALIZABLE --maxColumnWidth=MAXCOLWIDTH ---Set the maximum width of the string column: beeline --maxColumn --maxWidth=MAXWIDTH ---Set the maximum width of the truncated data: beeline --max --nullemptystring=[true/false] --- Print an empty string: beeline --nullemptystring=false --numberFormat=[pattern] ---Number using DecimalFormat:beeline --numberFormat='#,###,##0.00' --outputformat=[table/vertical/csv/tsv/dsv/csv2/tsv2] --- Output format: beeline --outputformat=tsv --showHeader=[true/false] --- Display the column name of the query result: beeline --showHeader=false --showNestedErrs=[true/false] ---Show nesting error: beeline --showNestedErrs=true --showWarnings=[true/false] ---Show warning: beeline --showWarnings=true --silent=[true/false] ---Reduce the amount of information displayed: beeline --silent=true --truncateTable=[true/false] --- Whether to truncate the table column on the client side --verbose=[true/false] ---Display detailed error message and debugging information: beeline --verbose=true -d ---Use a driver class: beeline -d driver_class -e --- Use a query: beeline -e 'query_string' -f ---Load a file: beeline -f filepath Multiple files with -e file1 -e file2 -n ---Load a username: beeline -n ​​valid_user -p ---Load a password: beeline -p valid_password -u ---Load a JDBC connection string: beeline -u db_URL