Hive - Beeline

> Database > Apache - Hive (HS|Hive Server)

1 - About

Beeline is a JDBC client that is based on the SQLLine CLI

Advertising

3 - Mode

The Beeline shell works in both embedded mode as well as remote mode.

4 - Management

4.1 - Connection

  • bash
beeline -u jdbc:hive2://localhost:10000/default -n scott -w password_file
  • beeline with connect
beeline> !connect jdbc:hive2://localhost:10001/default;transportMode=http scott tiger org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://localhsot:10001/default;transportMode=http
Connected to: Apache Hive (version 1.2.1000.2.6.2.38-1)
Driver: Hive JDBC (version 1.2.1000.2.6.2.38-1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
  • beeline URL in environment variable BEELINE_URL_BLUE
beeline> !connect blue

4.2 - Deconnection

!quit

4.3 - Refresh Connection

  • refresh a connection that has already been established. It is not able to do a fresh connect after !close
!reconnect 
Advertising

4.4 - Data

SHOW DATABASES;
USE <database>;
 
SHOW TABLES;
DESC <table>;
DESC FORMATTED <table>;

5 - Documentation / Reference

db/hive/beeline.txt · Last modified: 2019/06/04 15:04 by gerardnico