Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> STORING each relation in it's own file

Yulia Tolskaya 2012-01-13, 21:35
Copy link to this message
Re: STORING each relation in it's own file
Hi Yulia,

One way to accomplish this is by writing your own StoreFunc.  Take a
look at org.apache.pig.piggybank.storage.MultiStorage.  You'd need to
create your own output format and possibly a record writer.


On Fri, Jan 13, 2012 at 4:35 PM, Yulia Tolskaya <[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to store each line in a relation in it's own file, and avoid having one huge output file.
> I cannot seem to find a good way to do this. I would basically like to have something equivalent to a STORE in a FOREACH. What is the best way to do this?
> Yulia