Dear Wiki user, You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The following page has been changed by CorinneC: http://wiki.apache.org/pig/RunPig ------------------------------------------------------------------------------ * '''Script File''': Place Pig commands in a script file and run the script. * '''Embedded Program''': Embed Pig commands in a host language and run the program. - Note: The script file mentioned above is a script that you create and which contains the Pig commands that you want to run using Pig (we provide a sample script in the next section). Please note, however, that Pig, itself, is also a script (pig.sh), and is referred below to as "The Pig Script." + Note: Also see the Pig Latin exec and run commands. === Sample Code === The sample code files you need to run the examples on this page include: @@ -68, +68 @@ $ export PIG_CLASSPATH=./pig.jar }}} - (1) With the Pig Script From your current working directory, run: {{{ @@ -82, +81 @@ grunt> dump B; }}} - (2) Without the Pig Script - - From your current working directory, run: - {{{ - $ java -cp pig.jar org.apache.pig.Main -x local - Or - $ java âjar pig.jar âx local - }}} - - The Grunt shell is invoked and you can enter commands at the prompt. === Script File === @@ -103, +92 @@ $ export PIG_CLASSPATH=./pig.jar }}} - (1) With the Pig Script From your current working directory, run: @@ -111, +99 @@ $ pig -x local id.pig }}} + The Pig Latin statements are executed and the results are displayed to your terminal screen. - The results are displayed to your terminal screen. - - (2) Without the Pig Script - - From your current working directory, run: - {{{ - $ java -cp pig.jar org.apache.pig.Main -x local id.pig - Or - $ java âjar pig.jar âx local id.pig - }}} - - The results are displayed to your terminal screen. === Embedded Program === @@ -160, +137 @@ From your current working directory, run: {{{ $ pig + or + $ pig -x mapreduce }}} The Grunt shell is invoked and you can enter commands at the prompt. @@ -177, +156 @@ From your current working directory, run: {{{ $ pig id.pig + or + $ pig -x mapreduce id.pig }}} - The results are displayed to your terminal screen. + The Pig Latin statements are executed and the results are displayed to your terminal screen. === Embedded Program ===
