Connecting Hive with BEELINE

This post will explain how to connect to Beeline as well as how to connect Hive from Beeline.

Simply type “beeline” into the terminal window to launch the “Beeline” shell. When you connect to the beeline, it will inform you of the beeline and Cloudera versions (if you are using Cloudera VM).

Once connected to Beeline Grunt, use the following command to connect to Hive.

!connect jdbc:hive2://quickstart.cloudera:10000/default

quickstart.cloudera is the host-name, if you are using localhost then use the below command.

!connect jdbc:hive2://localhost:10000/default
Or replace it with your host-name.

The default port for connecting is 10000, and the database to use is “default“. Change the settings to suit your needs.

Once it is connected, you can start querying the database as shown below.

Beeline_Hive_ConnectBeeline_Hive_Connect2

Hope you find this article helpful.

Let me know if you are facing any issues.

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s