Analysis of Pig Script PDF
Analysis of Pig Script PDF
APACHE PIG
1.1INTRODUCTION
Apache Pig is a platform, used to analyze large data sets representing them as data
flow. It is designed to provide and abstraction over MapReduce, reducing the
complexities of writing a MapReduce program. We can perform data
manipulation operations very easily in Hadoop using Apache Pig.
Apache Pig extracts the data, performs operations on that data and dumps the
data in the required format in HDFS i.e. ETL (Extract Transfer Load).
Apache Pig automatically optimizes the task before execution, i.e. automatic
optimization.
It allows programmers and developers to concentrate upon the whole
operation irrespective of creating Mapper and Reducer functions separately.
Step 2: Load the file from local file system into HDFS.
(The Mummy,3.5)
(Night Tide,2.8)
(Muriel's Wedding,3.5)
(Mother's Boys,3.4)
(Nosferatu,3.5)
(Nick of Time,3.4)
grunt>dump rating;
(2,The Mummy,1932,3.5,4388)
(7,Muriel's Wedding,1994,3.5,6323)
(8,Mother's Boys,1994,3.4,5733)
(9,Nosferatu,1929,3.5,5651)
(10,Nick of Time,1995,3.4,5333)
grunt> dump a;
(7,Muriel's Wedding,1994,3.5,6323)
(8,Mother's Boys,1994,3.4,5733)
(2,The Mummy,1932,3.5,4388)
(7,Muriel's Wedding,1994,3.5,6323)
(8,Mother's Boys,1994,3.4,5733)
(9,Nosferatu,1929,3.5,5651)
(10,Nick of Time,1995,3.4,5333)
(2,The Mummy,1932,3.5,4388)
(5,Night Tide,1963,2.8,5126)
(7,Muriel's Wedding,1994,3.5,6323)
(8,Mother's Boys,1994,3.4,5733)
(9,Nosferatu,1929,3.5,5651)
(10,Nick of Time,1995,3.4,5333)
(9,Nosferatu,1929,3.5,5651)
((Nosferatu,1929),{(9,Nosferatu,1929,3.5,5651)})
((The Mummy,1932),{(2,The
Mummy,1932,3.5,4388)})
((Nick of Time,1995),{(10,Nick of
Time,1995,3.4,5333)})
((Mother's Boys,1994),{(8,Mother's
Boys,1994,3.4,5733)})
((Muriel's Wedding,1994),{(7,Muriel's
Wedding,1994,3.5,6323)})
({(Nosferatu)},{(3.5)},3.5)
({(The Mummy)},{(3.5)},3.5)
({(Night Tide)},{(2.8)},2.8)
({(Nick of Time)},{(3.4)},3.4)
({(Mother's Boys)},{(3.4)},3.4)
({(Muriel's Wedding)},{(3.5)},3.5)
({(Nosferatu)},{(3.5)},3.5)
({(The Mummy)},{(3.5)},3.5)
({(Night Tide)},{(2.8)},2.799999952316284)
({(Nick of
Time)},{(3.4)},3.4000000953674316)
({(Mother's
Boys)},{(3.4)},3.4000000953674316)
({(Muriel's Wedding)},{(3.5)},3.5)
({(One Magic
Christmas)},{(3.8)},3.799999952316284)
({(Orphans of the
Strom)},{(3.2)},3.200000047683716)
({(The Object of
Beauty)},{(2.8)},2.799999952316284)
1. htts://en.wikipedia.org/wiki/Pig
2. https://www.tutorialspoint.com/apache_pig/
3. https://hortonsworks.com/tutorial/how-to-process-data- withapache pig/
4. https://intellipaat.com/tutorial/hadoop-tutorials/apache-pig/