Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: beeline commandline connect example


Beeline Example

No Format
% bin/beeline 
Hive version 0.11.0-SNAPSHOT by Apache
beeline> !connect jdbc:hive2://localhost:10000 scott tiger
!connect jdbc:hive2://localhost:10000 scott tiger 
Connecting to jdbc:hive2://localhost:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-SNAPSHOT)
0: jdbc:hive2://localhost:10000> show tables;
show tables;
|     tab_name      |
| primitives        |
| src               |
| src1              |
| src_json          |
| src_sequencefile  |
| src_thrift        |
| srcbucket         |
| srcbucket2        |
| srcpart           |
9 rows selected (1.079 seconds)


Using commandline arguments to connect. This means you can find the command with connection string from your unix shell history. Note that this is not reccomended if you are using password based authentication, as it would save the password as well in your shell history.

No Format
% beeline -u jdbc:hive2://localhost:10000/default -n scott -p tiger
Hive version 0.11.0-SNAPSHOT by Apache

Connecting to jdbc:hive2://localhost:10000/default
titleBeeline with NoSASL connection

If you'd like to connect via NOSASL mode, you must specify the authentication mode explicitly:

% bin/beeline
beeline> !connect jdbc:hive2://<host>:<port>/<db>;auth=noSasl hiveuser pass