Hive - Beeline

About

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

Mode

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

Management

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

Deconnection

!quit

Refresh Connection

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

Data

SHOW DATABASES;
USE <database>;

SHOW TABLES;
DESC <table>;
DESC FORMATTED <table>;

Documentation / Reference


Powered by ComboStrap