{"id":618,"date":"2019-03-05T11:34:14","date_gmt":"2019-03-05T11:34:14","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=618"},"modified":"2024-04-06T10:19:00","modified_gmt":"2024-04-06T10:19:00","slug":"hadoop-basic-pig-commands-with-examples","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/","title":{"rendered":"Hadoop Basic PIG Commands with Examples"},"content":{"rendered":"<h1>Hadoop Basic PIG Commands with Examples<\/h1>\n<p>&nbsp;<\/p>\n<p><strong>Hadoop Basic PIG Commands with Examples<\/strong>, are you looking for a list of Top Rated Pig commands in Hadoop examples? Or the one who is casually glancing for the best platform which is listing the Top-rated Hadoop pig script commands with examples for beginners? Then you\u2019ve landed on the Right Platform which is packed with Tons of Tutorials of Pig commands for Hadoop. Follow the below mentioned Pig commands in Hadoop which were originally designed by the world-class Trainers of <a href=\"https:\/\/prwatech.in\/\">Big Data Training institute<\/a> Professionals.<\/p>\n<p>&nbsp;<\/p>\n<p>If you are the one who is a hunger to become the certified Pro Hadoop Developer? Or the one who is looking for the best <a href=\"https:\/\/prwatech.in\/\">Hadoop Training institute<\/a> which offering advanced tutorials and <a href=\"https:\/\/prwatech.in\/\">Hadoop certification course<\/a> to all the Tech Enthusiasts who are eager to learn the technology from 0 Level to Advanced Level.<\/p>\n<p>&nbsp;<\/p>\n<h2>Basic PIG commands in Hadoop<\/h2>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4152\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Basic-PIG-Commands.jpg\" alt=\" Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"323\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Basic-PIG-Commands.jpg 828w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Basic-PIG-Commands-300x114.jpg 300w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Basic-PIG-Commands-768x292.jpg 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong> Create the following input file (text format)<br \/>\n<\/strong><\/li>\n<\/ul>\n<h3><strong>Database 1: studb<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-639\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/studb.png\" alt=\"pig commands in hadoop\" width=\"850\" height=\"280\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/studb.png 416w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/studb-300x99.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Database 2: empdb<\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-640\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/empdb.png\" alt=\"pig commands in hadoop\" width=\"850\" height=\"227\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/empdb.png 441w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/empdb-300x80.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>#Database 3: detaildb<\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-641\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/detaildb.png\" alt=\"pig commands in hadoop\" width=\"850\" height=\"220\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/detaildb.png 514w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/detaildb-300x78.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Database 4: stu2db<\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-642\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/stu2db.png\" alt=\"pig commands in hadoop\" width=\"850\" height=\"275\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/stu2db.png 312w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/stu2db-300x97.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Move the created file from LFS to HDFS<\/h3>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4153\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Create-file-from-LFS-to-HDFS.png\" alt=\" Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"199\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Create-file-from-LFS-to-HDFS.png 687w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Create-file-from-LFS-to-HDFS-300x70.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Run PIG command from console (cluster mode)<strong><br \/>\n<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4154\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/PIG-command-from-console.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"330\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/PIG-command-from-console.png 688w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/PIG-command-from-console-300x116.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<h3>Data Input using pig:\u00a0Load data from hdfs to Pig<\/h3>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4155\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Load-data-from-hdfs-to-Pig.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"271\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Load-data-from-hdfs-to-Pig.png 671w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Load-data-from-hdfs-to-Pig-300x96.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<h3>Dump Command:\u00a0This command is used to display all data loaded.<\/h3>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4156\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Dump-Command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"342\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Dump-Command.png 677w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Dump-Command-300x121.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Foreach:\u00a0This command is used to generate data transformation based on columns of data<\/h3>\n<p><strong> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4157\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"222\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach.png 665w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-300x78.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4158\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"255\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command.png 660w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command-300x90.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Filter: Select particular tuples from a relation based on a condition.<\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4159\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/filter-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"393\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/filter-command.png 708w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/filter-command-300x139.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Order By: Sort a relation based on one or more fields<\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4160\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/order-by-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"438\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/order-by-command.png 704w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/order-by-command-300x155.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Store: Save results to the local file system or HDFS<\/h3>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4161\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/store-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"548\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/store-command.png 696w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/store-command-300x194.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Cogroup: This operator is used to group two databases using a particular column.<\/h3>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4162\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cogroup-commands.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"305\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cogroup-commands.png 681w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cogroup-commands-300x107.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><a href=\"https:\/\/www.youtube.com\/watch?v=NoFbeMkb6NI\">Pig commands in Hadoop with examples<\/a><\/h2>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/NoFbeMkb6NI\" width=\"850\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<h3>Join: This operator is used to join two or more table.<\/h3>\n<p>&nbsp;<\/p>\n<p><strong>Inner Join:<\/strong> Joining two table having a common column<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4163\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/inner-join-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"347\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/inner-join-command.png 666w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/inner-join-command-300x123.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Left Outer:\u00a0<\/strong>The left outer Join operation returns all rows from the left table, even if there are no matches in the right relation<\/p>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4164\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/left-outer.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"308\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/left-outer.png 702w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/left-outer-300x109.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>Right Outer:\u00a0<\/strong>The right outer join operation returns all rows from the right table, even if there are no matches in the left table.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4165\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-outer-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"304\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-outer-command.png 624w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-outer-command-300x107.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Cross:\u00a0<\/strong>The CROSS operator computes the cross-product of two or more relations.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4166\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cross-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"511\" height=\"519\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cross-command.png 511w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/cross-command-295x300.png 295w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Union: <\/strong>The UNION operator of Pig Latin is used to merge the content of two relations.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4167\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/union-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"362\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/union-command.png 570w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/union-command-300x128.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/strong><\/p>\n<p><strong>Split: <\/strong>The split operator is used to split a relation into two or more relations.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4168\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/split-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"193\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/split-command.png 659w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/split-command-300x68.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--blog-header\">\n<h2 class=\"ui--blog-title clearfix\"><span class=\"ui--blog-link\">PIG Commands with Examples<\/span><\/h2>\n<p>&nbsp;<\/p>\n<\/div>\n<h3>GROUP OPERATOR:<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"ui--blog-content\">\n<div class=\"ui--image-wrap clearfix\">The simpler of these operators is GROUP. Continuing with the same set of relations<\/div>\n<div><\/div>\n<div class=\"auto-format ui--animation\">\n<p>grunt&gt; Emp_grouped = GROUP Emp BY salary;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4169\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/group-empty-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"45\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/group-empty-command.png 381w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/group-empty-command-300x16.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><strong><br \/>\n<\/strong>grunt&gt; DUMP Emp_grouped;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4170\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-group-command.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"74\" \/><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<div class=\"ui--blog-content\">\n<div class=\"auto-format ui--animation\">\n<p><strong>Group Output:<\/strong><\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4171\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/group-output3.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"317\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--blog-content\">\n<h3>FOREACH OPERATOR:<\/h3>\n<\/div>\n<div class=\"auto-format ui--animation\"><\/div>\n<div class=\"auto-format ui--animation\">\n<p>One of the key uses of Pig is data transformation. You can define a new relation based on the fields of an existing relation using the FOREACH command<\/p>\n<p>grunt&gt; foreach_Emp = FOREACH Emp GENERATE id,name;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4172 aligncenter\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"36\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command-example.png 517w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-command-example-300x13.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"auto-format ui--animation\">\n<p><strong>grunt&gt; dump foreach_Emp;<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4173 aligncenter\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-foreach-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"64\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Foreach Output:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4174\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-output-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"252\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-output-example.png 351w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/foreach-output-example-300x89.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"auto-format ui--animation\">\n<h3>JOIN\u00a0OPERATOR:<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"auto-format ui--animation\">\n<p>which groups together tuples from multiple relations . It functions much like a join. For example, let\u2019s\u00a0Join Emp and Customer on the first column.<br \/>\ngrunt&gt; Emp_self = join\u00a0Emp by id, Customer by id;<strong><br \/>\n<\/strong><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4175 aligncenter\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Join-self-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"46\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Join-self-example.png 439w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Join-self-example-300x16.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<\/div>\n<div><\/div>\n<div class=\"auto-format ui--animation\">\n<div class=\"ui--image-wrap clearfix\">grunt&gt; DUMP Emp_self;<\/div>\n<div><\/div>\n<div><\/div>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4176\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-Join-self-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"73\" \/><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div><\/div>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<div class=\"ui--image-wrap clearfix\">Self Join Output:<\/div>\n<div><\/div>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4177\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-self-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"499\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-self-example.png 501w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-self-example-300x176.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<div class=\"auto-format ui--animation\">\n<div class=\"ui--image-wrap clearfix\"><strong>\u00a0<\/strong><\/div>\n<\/div>\n<div class=\"auto-format ui--animation\">\n<p>By default behavior of join as an outer join, and the join keyword can modify it to be left outer join, right outer join, or inner join.Another way to do inner join in Pig is to use the JOIN operator. Empcust_left = join Emp by id left outer, Customer by id;<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4178\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Left-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"36\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Left-join-example.png 490w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Left-join-example-300x13.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<div class=\"ui--image-wrap clearfix\">grunt&gt; dump Empcust_left;<\/div>\n<div class=\"ui--image-wrap clearfix\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4179\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-Left-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"62\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><strong>Left Outer Join Output:<\/strong><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4180\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-left-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"289\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-left-example.png 312w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-join-left-example-300x102.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">Empcust_right = join Emp by id right outer, Customer by id;<\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4181\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"30\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-join-example.png 541w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/right-join-example-300x11.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">grunt&gt; dump\u00a0Empcust_right;<\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4182\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-right-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"68\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><strong>Right Outer Join Output:<\/strong><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4183\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-right-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"255\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-right-join-example.png 404w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-right-join-example-300x90.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">Empcust_full = join Emp by id full outer, Customer by id;<\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4184\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/full-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"34\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/full-join-example.png 544w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/full-join-example-300x12.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">grunt&gt; dump\u00a0Empcust_full;<\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4185\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-full-join-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"64\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">Full Outer Join Output:<\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4186\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-full-join18.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"628\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-full-join18.png 310w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-full-join18-300x222.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3 class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">DISTINCT OPERATOR:<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"auto-format ui--animation\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">\u00a0grunt&gt; Emp2_dist = DISTINCT Emp2;<\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4187\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Distinct-emp-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"57\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Distinct-emp-example.png 345w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Distinct-emp-example-300x20.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"auto-format ui--animation\">\n<p>grunt&gt; dump Emp2_dist;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4188\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-distinct-example.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"79\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">DISTINCT Output:<\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4189\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/distinct-output21.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"247\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<p>&nbsp;<\/p>\n<h3 class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">LIMIT OPERATOR:<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"ui--space clearfix\" data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">grunt&gt; limit_data = LIMIT Emp 3;<\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4190\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/limit-22.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"59\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/limit-22.png 302w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/limit-22-300x21.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div data-responsive=\"{&quot;css&quot;:{&quot;height&quot;:{&quot;phone&quot;:&quot;2px&quot;,&quot;tablet&quot;:&quot;2px&quot;,&quot;widescreen&quot;:&quot;2px&quot;}}}\"><\/div>\n<div class=\"auto-format ui--animation\">\n<p>grunt&gt; dump limit_data;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4191\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/dump-limit-23.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"75\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>LIMIT Output:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4192\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/output-limit23.png\" alt=\"Hadoop Basic PIG Commands with Examples\" width=\"850\" height=\"242\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hadoop Basic PIG Commands with Examples &nbsp; Hadoop Basic PIG Commands with Examples, are you looking for a list of Top Rated Pig commands in Hadoop examples? Or the one who is casually glancing for the best platform which is listing the Top-rated Hadoop pig script commands with examples for beginners? Then you\u2019ve landed on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2996,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,1644],"tags":[1871,1870,281,1872,55],"class_list":["post-618","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hadoop","category-pig","tag-apache-pig-tutorial-get-ahead-in-the-big-data-game","tag-getting-started-apache-pig","tag-hadoop-basic-pig-commands-with-examples","tag-hadoop-basic-pig-commands-with-examples-prwatech","tag-hadoop-pig-commands"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop<\/title>\n<meta name=\"description\" content=\"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop\" \/>\n<meta property=\"og:description\" content=\"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-05T11:34:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-06T10:19:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/\",\"url\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/\",\"name\":\"Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg\",\"datePublished\":\"2019-03-05T11:34:14+00:00\",\"dateModified\":\"2024-04-06T10:19:00+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg\",\"width\":1024,\"height\":768,\"caption\":\"Hadoop Pig Commands\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hadoop Basic PIG Commands with Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop","description":"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop","og_description":"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.","og_url":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2019-03-05T11:34:14+00:00","article_modified_time":"2024-04-06T10:19:00+00:00","og_image":[{"width":1024,"height":768,"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg","type":"image\/jpeg"}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/","url":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/","name":"Hadoop Basic Pig Commands with Examples | Pig Commands in Hadoop","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg","datePublished":"2019-03-05T11:34:14+00:00","dateModified":"2024-04-06T10:19:00+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Here is the list of top rated best Hadoop baisc Pig Commands and Pig Commands in Hadoop with examples for freshers and Experienced.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/Hadoop-Pig-Commands.jpg","width":1024,"height":768,"caption":"Hadoop Pig Commands"},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/hadoop\/pig\/hadoop-basic-pig-commands-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Hadoop Basic PIG Commands with Examples"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=618"}],"version-history":[{"count":13,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/618\/revisions"}],"predecessor-version":[{"id":11286,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/618\/revisions\/11286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media\/2996"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}