Hive
Hive ETL: Loading JSON, XML, Text Data Examples
Hive as an ETL and data warehousing tool on top of Hadoop ecosystem provides functionalities like...
Prior to Apache Hive installation we require dedicated Hadoop installation, up and running with all the Hadoop daemons.
For Installation of Hadoop check this link
Once all the Hadoop daemons are working fine, just start Apache Hive installation part.
Installation process-
Step 1) Downloading and Installing Hive
For downloading Hive stable setup refer Apache URL as mentioned below
http://www.apache.org/dyn/closer.cgi/hive/. Go to the URL and select the apache mirror download link.
Select the Latest version of Hive. (In my current case it is hive – 3.1.2)
Click on the bin file and downloading will start.
Step 2) Extracting the tar file.
Go to the downloaded Tar file location ->extract the tar file by using the following command
tar –xvf apache-hive-3.1.2-bin.tar.gz
Step 3) Different Configuration properties to be placed in Apache Hive.
In this step, we are going to do two things
Code to be placed in bashrc
export HIVE_HOME="/home/gtupapershive/apache-hive-1.2.0-bin" export PATH=$PATH:$HIVE_HOME/bin
Open the hive-config.sh as shown in below
Mention the HADOOP_HOME Path in hive-config.sh file as shown in below ( HADOOP_HOME Path)
Step 4) Creating Hive directories in Hadoop:
To communicate with Hadoop, we need to create directories in Hadoop as shown below.
Giving root permissions to create Hive folders in Hadoop.If it doesn't throw any error message, then it means that Hadoop has successfully given permissions to Hive folders.
Step 5) Getting into Hive shell by entering '. /hive' command as shown in below.
Here we are going to create sample table using Hive shell command "create" with column names.
Sample Code for creating data base in Hive
From the above screen shot we can observe the following:
Sample Code for creating data base in Hive (For self check )
1) Create table product(product int, pname string, price float)
Row format delimited Fields terminated by ',';
2)describe product:
Hive as an ETL and data warehousing tool on top of Hadoop ecosystem provides functionalities like...
In this tutorial, you will learn- What is Hive? Hive Architecture Different modes of Hive What is...
What is a View? Views are similar to tables, which are generated based on the requirements. We can...
In this tutorial, you will learn- Join queries Different type of joins Sub queries Embedding custom...
Table Operations such as Creation, Altering, and Dropping tables in Hive can be observed in this...
Data types in Hive Data types are very important elements in Hive query language and data...