Store pig result to local file

apache-pig, hadoop

Solution

If you're not worried about merging everything to a single file then you can use the copyToLocal command in grunt (http://wiki.apache.org/pig/Grunt):

grunt> copyToLocal <src> <dest>

Problem

I run pig script do some aggerative operation, and output size is very small. Now I run ``` hadoop fs -getmerge ... ``` separately. Any way to let pig script dump the result into local file directly?

Original source