New Contributor
Posts: 5
Registered: ‎05-02-2014

Location of Pig Scripts in HUe when using Quickstart VM

I have created the pig script in quickbox VM  using Hue interface and it works. But how do I download the scripts once I have created the scripts?

 Where exactly is the directory for the scripts – if I wanted to use the hue file browser to download the scripts.

It’s very frustrating to not be able to find the pig scripts – even though I can see all  the scripts in  Pig editor  in Hue.

Please help!

Posts: 14
Registered: ‎12-19-2013

Re: Location of Pig Scripts in HUe when using Quickstart VM

[ Edited ]

Here's how I found the Pig script generated by the Hue interface running on Cloudera Live; I'm not sure how the Hue running in the QuickStart VM is configured, but hopefully it's similar.


First, I typed a simple script into the Pig editor, then hit the big "Play" arrow on the upper right to run the script.

Screen Shot 2014-05-02 at 12.51.12 PM.png


Second, after the script had completed, there was a "Status: OK" message above the green progress bar, and the "OK" was a link, so I clicked it.

Screen Shot 2014-05-02 at 12.53.07 PM.png


Third, on the Oozie Dashboard (the destination of the "OK" link that I clicked), I clicked on the "pig" step of the workflow.

Screen Shot 2014-05-02 at 12.54.46 PM.png


Fourth, I clicked on the "Configuration" tab of the "pig" step, which displayed an XML document. The text of the "script" element in this XML document is the location of the Pig script on HDFS. For me, this location was "/user/hue/oozie/workspaces/_jy1zpdi_-oozie-411-1399049516.87/script.pig". Note that "jy1zpdi" is my username on Cloudera Live.

Screen Shot 2014-05-02 at 12.56.21 PM.png


Fifth, to view the Pig script in the File Browser, I just appended the path to the base URL of, which gave me You can substitute the URL for your Hue server in the above and it should work for you.


Let me know if any of the above was unclear, or if your Hue installation is configured differently somehow.



New Contributor
Posts: 5
Registered: ‎05-02-2014

Re: Location of Pig Scripts in HUe when using Quickstart VM

Jeff, thank you so much for spending the time to respond to my issue. I appreciate it. Yes, I can get to the pig script - script.pig.


I just wanted to explain what I need. I created a pig script  below with three lines:


test = load '/user/hue/pig/examples/data/midsummer.txt' AS (line:chararray);
describe test;
dump test;


I saved it as readfile.pig. I can see it in the pig editor saved as readfile.pig . 


I would like to create several pig scripts - readfile2.pig, readfile3.pig etc. 

I then would like to be able to download all these scripts as  readfile.pig, readfile1.pig etc to my local machine. Similarily I would like to be able to upload a bunch of pig scripts that I have written already into hue. I  believe that all the sripts in hue must be stored in some directory - so question is what is that directory? I hope that  makes sense.



I also realized that the user 'cloudera' is only a hue superuser and not an hdfs superuser - so is that an issue too?





New Contributor
Posts: 3
Registered: ‎05-31-2017

Re: Location of Pig Scripts in HUe when using Quickstart VM

Any ideas about where scripts are located?