Skip to main content

Posts

Showing posts with the label Hadoop

HIVE : How to create a database, table and load data

 Please keep below points in mind before creating a table in HIVE. HIVE is not a database but it is a data warehouse which is designed for data analytics(OLAP) HIVE doesn't have any internal storage to store data, it will use HDFS to store table data and RDBMS(like MySQL) to store schema related information. Hence we need to have a RDBMS like MySQL. When we create a database, HIVE will create a folder in HDFS. Later when we create a HIVE table, it will create another folder inside database folder. After creating database, table, once we load/insert data into it then that data will be stored as a file in HDFS and schema information will be stored in MySQL. Delimiter is very important while loading the data, we will see some examples below. As this is analytics, we know what type of data is there(as data is historical) and we will create schema based on the data. Based on the data, we need to create a table. HOW TO CREATE DATABASE ----------------------------- CREATE DATABASE IF NOT ...

Hadoop : HIVE Installation

A person sailing in a boat who know swimming will always be in a safe side comparatively with other person who doesn't know how to swim. Guys, we all know that we are using Cloud based platforms like AWS Athena for working on HIVE these days, but it is very important to understand the basics of HIVE, like what is HIVE, how to install it, what are the installation modes, HIVE tables, concepts involved in it to format the data, serDe etc.,  Most of the time, already implemented HIVE serDe's are good enough for practical use cases but what if we land into a situation where we have to write our own serDe in Java? Hence, it is good to have this knowledge for a Data engineer though we are using UI in cloud to perform same activities. Hence let's learn HIVE in depth and have this knowledge with us to sail further.  What is HIVE ? Apache Hive is a data warehouse software project. It is built on top of Apache Hadoop for providing data query and analysis. Hive gives an SQL-like inter...