You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Syntax<br />
PIG ;<br />
Pig Code Options<br />
CODE=fileref | 'external-file'<br />
specifies the source that contains the Pig language code to execute.<br />
fileref<br />
is a SAS fileref that is assigned to the source file. To assign a fileref, use the<br />
FILENAME statement.<br />
'external-file'<br />
is the physical location of the source file. Include the complete pathname and the<br />
filename. Enclose the physical name in single or double quotation marks.<br />
PARAMETERS=fileref | 'external-file'<br />
specifies the source that contains parameters to be passed as arguments when the Pig<br />
code executes.<br />
fileref<br />
is a SAS fileref that is assigned to the source file. To assign a fileref, use the<br />
FILENAME statement.<br />
'external-file'<br />
is the physical location of the source file. Include the complete pathname and the<br />
filename. Enclose the physical name in single or double quotation marks.<br />
REGISTERJAR='external-file(s)'<br />
specifies the locations of the JAR files that contain the Pig scripts to execute. Include<br />
the complete pathname and the filename. Enclose each location in single or double<br />
quotation marks.<br />
Examples: HADOOP Procedure<br />
Example 1: Submitting HDFS Commands<br />
Details<br />
This PROC HADOOP example submits HDFS commands to a Hadoop server. The<br />
statements create a directory, delete a directory, and copy a file from HDFS to a local<br />
output location.<br />
Program<br />
Example 1: Submitting HDFS Commands 27<br />
filename cfg "C:\Users\sasabc\hadoop\sample_config.xml"; 1<br />
proc hadoop options=cfg username="sasabc" password="sasabc" verbose; 2<br />
hdfs mkdir="/user/sasabc/new_directory"; 3<br />
hdfs delete="/user/sasabc/temp2_directory"; 4<br />
hdfs copytolocal="/user/sasabc/testdata.txt"