The prerequisites for Apache Pig installation are Java and Hadoop to be installed in the system. Download the latest version of Pig from http://www.apache.org/dyn/closer.cgi/pig.
Unzip the downloaded file. The Pig script is located in the bin directory (/pig-n.n.n/bin/pig). Add /pig-n.n.n/bin to your path. Use export (bash,sh,ksh) or setenv (tcsh,csh). For example:
- $ export PATH=/<my-path-to-pig>/pig-n.n.n/bin:$PATH
To get the list of pig commands write:
- $ pig -help
To start the grunt shell write the below command:
- $ pig