Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: reformat Beeline command options table to fix line breaks

...

The Beeline CLI supports these command line options:

--help

Option

Usage

Description

-u <database URL>beeline -u db_URL 

The JDBC URL to connect to.

Usage: beeline -u db_URL 

-n <username>

-n <username>

beeline -n user1

The username to connect as.

Usage: beeline -n valid_user

-p <password>

-p <password>

beeline -p user1_password

The password to connect as.

Usage: beeline -p valid_password

-d <driver class>

The driver class to use.

Usage: beeline -d driver_class

The driver class to use.

-e <query>

Query that should be executed.

Usage: beeline -e "query_string"

Query that should be executed.

Version: 0.13.0 (HIVE-5765)

-f <file>beeline -f filepath

Script file that should be executed.executed.

Usage: beeline -f filepath

Version: 0.12.0 (HIVE-4268)

--hiveconf property=value

Use value for the given property.

Usage: beeline --hiveconf prop1=value1

Use value for the given property.

Version: 0.13.0 (HIVE-6173)

--hivevar name=valuebeeline --hivevar var1=value1

Hive variable name and value. This is a Hive-specific setting in which variables can be set
at the session level and referenced in Hive commands or queries.

Usage: beeline --hivevar var1=value1

--color=[true/false]beeline --color=true

Control whether color is used for display. Default is false.

Usage: beeline --

showHeader

color=

[

true

/false]

beeline --showHeader=[true/false]

Show column names in query results (true) or not (false). Default is true.

Usage: beeline --

headerInterval

showHeader=

ROWS

false

beeline --headerInterval=50ROWS

The interval for redisplaying column headers, in number of rows, when outputformat is table.
Default is 100.

Usage: beeline --headerInterval=50

--fastConnect=[true/false]beeline --fastConnect=false

When connecting, skip building a list of all tables and columns for tab-completion of
HiveQL statements (true) or build the list (false). Default is true.

Usage: beeline --

autoCommit

fastConnect=

[true/

false

]

beeline --autoCommit=[true/false]

Enable/disable automatic transaction commit. Default is false.

Usage: beeline --

verbose

autoCommit=

[

true

/false]

beeline --verbose=[true/false]

Show verbose error messages and debug information (true) or do not show (false).
Default is

false.

false.

Usage: beeline --verbose=true

--showWarnings=[true/false]beeline --showWarnings=true

Display warnings that are reported on the connection after issuing any HiveQL commands.
Default is false.

Usage: beeline --

showNestedErrs

showWarnings=

[

true

/false]

beeline --showNestedErrs=[true/false]

Display nested errors. Default is false.

Usage: beeline --showNestedErrs=true

--numberFormat=[pattern]

Format numbers using a DecimalFormat pattern.

Usage: beeline --numberFormat="#,###,##0.00"

Format numbers using a DecimalFormat pattern.

--force=[true/false]beeline--force=true true/false]

Continue running script even after errors (true) or do not continue (false). Default is false.

Usage: beeline--

maxWidth

force=

MAXWIDTH

true

beeline --maxWidth=150MAXWIDTH

The maximum width to display before truncating data, in characters, when outputformat is table.
Default is to query the terminal for current width, then fall back to 80.

 

Usage: beeline --

maxColumnWidth

maxWidth=

MAXCOLWIDTH

150

beeline --maxColumnWidth=25MAXCOLWIDTH

The maximum column width, in characters, when outputformat is table. Default is 15.

Usage: beeline --maxColumnWidth=25

--silent=[true/false]beeline --silent=true

Reduce the amount of informational messages displayed (true) or not (false). Default is false.

Usage: beeline --

autosave

silent=

[

true

/false]

beeline --autosave=[true/false]

Automatically save preferences (true) or do not autosave (false). Default is false.

Usage: beeline --autosave=true

--outputformat=[table/vertical/csv/tsv]beeline --outputformat=tsv

Format mode for result display. Default is table.

Usage: beeline --

isolation

outputformat=

LEVEL

tsv

beeline --isolation= SERIALIZABLELEVEL

Set the transaction isolation level to TRANSACTION_READ_COMMITTED
or TRANSACTION_SERIALIZABLE.
See the "Field Detail" section in the Java Connection documentation.

 

Usage: beeline --isolation=TRANSACTION_SERIALIZABLE

--nullemptystring=[true/false]beeline --nullemptystring=false

Use historic behavior of printing null as empty string (true) or use current behavior of printing
null as NULL (false). Default is false.

Usage: beeline --nullemptystring=false

Version: 0.13.0 (HIVE-4485)

beeline --help

Display a usage message.

Usage: beeline --help

JDBC

HiveServer2 has a new JDBC driver. It supports both embedded and remote access to HiveServer2.

...