Input and Output
Tuesday, February 22, 2011
12:57 PM
The LOAD command: 
<alias> = LOAD '<filename>' USING PigStorage('\t') AS (<fieldname>:<type>, <fieldname>,...); 
Read a text file, parse lines into fields at '\t', assign names to fields. 
Example: 
raw = LOAD 'excite.log' USING PigStorage('\t') AS (user, time, query);
The STORE command:
STORE <alias> INTO '<filename>' USING PigStorage();
Write contents of a relation into a file. 
Example: 
STORE same1 INTO '/tmp/tutorial-join-results' USING PigStorage();
Notes: 
PigStorage is a class that reads and writes text files. 
You can REGISTER your own class to do this. 
The argument is the argument to the constructor of an instance.
Pasted from <[link]> 