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 ShubhamChopra: http://wiki.apache.org/pig/PigPen New page: == PigPen == PigPen is an eclipse plugin that helps users create pig-scripts, test them using the example generator and then submit them to a hadoop cluster as well. === Using PigPen === To start using PigPen you will have to set the path to the directory containing hadoop-site.xml for the plugin to connect to the cluster. This can be done by going to Eclipse preferences -> Pig and adding a new variable *ConfigurationPath* to the JobConf properties. Diagram 1 : Setting the ConfigurationPath attachment:ConfigurationPath.png 1. Create a new "General" Project in eclipse. 2. Add a new file to the project. Make sure the file has an extension ".pig". 3. This should start the Pig editor with the new empty file. PigPen has 3 editors. The *Operator Graph* shows you the query in a graph form. The *Header* is to be used with the Operator Graph for registering jars or giving define directives. The *Pig Script* is the text editor. The figure below shows the PigPen editor. Diagram 2 : PigPen editor attachment:pigPenEditor.png 4. Currently the script can only be edited using the *Pig Script* text editor. The synchronization between the graph and the text editor happens when you save the script. So its a good idea to save the changes in the text editor before switching views. The following screenshots show the usage of the *Pig Script* editor. Diagram 3 : Sample Script attachment:textEditor.png Diagram 4 : Operator Graph attachment:Graph.png ==== Running the Example Generator ==== Once the script is error-free, you can run the example generator by clicking on the Pig icon in the toolbar. Once satisfied with the results, you can submit the script to the cluster by clicking on the Hadoop icon. Diagram 5 : Pig and Hadoop icons are the 4th and 5th from left. attachment:ToolBar.png The following diagram shows the Pig Examples window Diagram 6 : Output of the Example Generator attachment:PigExample.png