Hive - Beeline

Card Puncher Data Processing

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





Discover More
Card Puncher Data Processing
Hive - Client

command lind: browser: HiveWebInterface Squirrel...
Card Puncher Data Processing
Hive - Connection

A connection is made through: a client via an See for instance Beeline
Card Puncher Data Processing
Hive - Hive command line

Seems to be deprecated for beeline.
Card Puncher Data Processing
Hive - Table

Table implementation in Hive. serializer/deserializers (SerDe) The fully qualified name in Hive for a table is: where: db_name is the database name By default, tables are assumed to be of:...
Card Puncher Data Processing
Hive - Variable (hivevar)

Hive variables are variables that can be set at the session level and referenced in Hive commands or queries. --hivevar options hivevar Example with and a URL Select with substituion...
Card Puncher Data Processing
Spark SQL - Server (Thrift) (STS)

The spark SQL server is the HiveServer2 in Hive 1.2.1. It's a Thrift JDBC/ODBC server beeline from Spark or Hive 1.2.1 Hive 1.2.1 There is not yet a service discovery (SPARK-19541)...
Card Puncher Data Processing
Spark Sql - Client

You can also interact with the SQL interface over: JDBC/ODBC (ie the hiveserver2) (locally) beeline



Share this page:
Follow us:
Task Runner