Hive Commands

Apache Hive supports analysis of large datasets stored in Hadoop’s HDFS and compatible file systems. It provides an SQL-like language called HiveQL while maintaining full support for map/reduce.
Create a database:
Use this command:

Here we Check Database Created or Not:
Use this command:
hive>show databases;

If you want to see where my database created or stored you can check here
Open your Firefox browser and click the NameNode tab and Browse the Files Goto :/user/hive/warehouse/prwatech. Here your database is created.

Use database is a command ,use which database you want to use
database name prwatechdb;

I created sample text file as Emp.txt

Here I Created table name as employee

Describe will show you structure of your table

Load the data into a table

Select * from employee;

copy the Emp.txt as stored as customer infomation .copy file from local file system to hadoop(hdfs)
use this commands >hadoop dfs -copyFromLocal

Here I Created table name as Customer

Display all information about employee

select count(*) from employee;

Load the data into a table

This command used for Drop table else delete the table

Category: Hive Commands