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.
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.
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.
Third, on the Oozie Dashboard (the destination of the "OK" link that I clicked), I clicked on the "pig" step of the workflow.
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.
Fifth, to view the Pig script in the File Browser, I just appended the path to the base URL of http://demo.gethue.com/filebrowser/view, which gave me http://demo.gethue.com/filebrowser/view/user/hue/oozie/workspaces/_jy1zpdi_-oozie-411-1399049516.87/.... 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.
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);
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?