Tuesday, 10 February 2015

PIG Vs HIVE

Some of the difference between PIG & HIVE are listed below:
A Blogger Table Caption
All about PIG HIVE
Desinged for ? PIG is desinged for Data processing, it can used in: 1. Data Piple Line 2. Research one raw data 3. Iterative processing HIVE is designed Data Presentation with sql like interface, it can be used in: 1. Analytics 2. Adhoc Queries
It looks like ? PIG Latin Script looks like Procedureal and Object oriented Language . It llows users to describe users how to process the data. Pig Latin script describes a directed acyclic graph (DAG). PIG has no if and for Loop statements as in other Procedureal language. HIVE - HQL looks like English and its is a declarative language like SQL.
where to use/query ? PIG can be used where Schema is unknown/inconsistance and data is not constrained. HQL statements required schema be known, i.e., we should aware of table.
where to use/query ? 1. Pig is desinged for data processing, as soon as the data loaded in HDFS we can start our analysis/processing on raw data.No need to load data in to table. 2. No need to write inverted set of subqueries or mainting temporary table, for eg: if we want to group the data based on key we can group it one the fly and we can do the further processing. 1.To run any Ad-hoc query/Analytics we should have data available in a table. 2.Data processing in HIVE required sub queries or temporary tables for example if we want to group the data based on a key and then join with another table required to load data in temporary table or a subqueries.
How to use it ? PIG can be used where Schema is unknown/inconsistance and data is not constrained. HQL statements required schema be known, i.e., we should aware of table.
Is it a case sesntive language? Yes, PIG is a case sensitive language. All the PIG Latin key words are not a case sensitive, all the columns, relations and functions are case sentive. Not a case sensitive language.

No comments:

Post a Comment