Apache Pig
-
- Apache Pig is used to creating programs that runs on Apache Hadoop.
- Pig Latin is a language.
- It execute in Hadoop jobs,MapReduce, Apache Tez, or Apache Spark
The programming from the Java MapReduce idiom into a notation which makes MapReduce high level, similar to SQL for relational database management systems.
- The user-defined functions (UDFs) called Pig Latin user can write in Java, Python, JavaScript, Ruby or Groovy.
Advantages of Pig
- Reusing the code
- Quick development
- Less lines of code
- Type checking and Schema etc.
Simple program for pig:
- Map: The data element consisting the data type chararray where element has pig data type include complex data type
- Example- [city’#’bang’,’pin’#560001].
- The city and pin are data element mapping the values here.