Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> PigDump not available anymore ?


Copy link to this message
-
Re: PigDump not available anymore ?
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.

http://pig.apache.org/docs/r0.9.1/api/org/apache/pig/piggybank/storage/CSVExcelStorage.html

Norbert

On Tue, Apr 10, 2012 at 12:08 PM, Kevin LION <[EMAIL PROTECTED]>wrote:

> Hi,
>
> 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 ?
>
> Regards,
> Kevin
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB