Kevin LION 2012-04-10, 16:08
-Re: PigDump not available anymore ?
Norbert Burger 2012-04-10, 16:52
Have you taken a look already at CSVExcelStorage from the piggybank?
PigDump may work ok for basic datatypes, but seems like you'd quickly run
into issues with quoted strings and more complex types.
On Tue, Apr 10, 2012 at 12:08 PM, Kevin LION <[EMAIL PROTECTED]>wrote:
> I would like load content from somewhere and store result in a CSV file.
> According to the doc here (
> http://pig.apache.org/docs/r0.9.2/func.html#pigdump), I can use PigDump().
> I've also this script :
> test = LOAD 'test.csv' USING org.apache.pig.builtin.PigStorage(',') AS
> > (key:chararray, value:chararray);
> > test = FOREACH test GENERATE FLATTEN(bag(STRSPLIT(value, ' '))) AS
> > word:chararray;
> > STORE test INTO 'test2.csv' USING org.apache.pig.builtin.PigDump();
> But this gives me an error :
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve
> > PigDump using imports: [, org.apache.pig.builtin.,
> > org.apache.pig.impl.builtin.
> I've looked into Pig code and didn't found the file PigDump.java into the
> org/apache/pig/impl/builtin directory. Does the PigDump function was
> removed ? What can I use to have the same behaviour ?