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 Plain View
Pig >> mail # user >> Storing field in a bag


+
Mohit Anchlia 2012-09-10, 17:53
+
Ruslan Al-Fakikh 2012-09-10, 23:05
Copy link to this message
-
Re: Storing field in a bag
You can achieve equivalent functionality by saying:

page = foreach b generate page;
store page into '/flume_vol/flume/input/page.dat';
network = foreach b generate network;
store network into '/flume_vol/flume/input/network.dat';

Alan.
On Sep 10, 2012, at 4:05 PM, Ruslan Al-Fakikh wrote:

> Hi, Mohit,
>
> http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#STORE
> I guess you can only STORE relations, not fields, etc
>
> Ruslan
>
> On Mon, Sep 10, 2012 at 9:53 PM, Mohit Anchlia <[EMAIL PROTECTED]> wrote:
>> I am trying to store field in a bag command but it fails with
>>
>> store b.page into '/flume_vol/flume/input/page.dat';
>> store b.network into '/flume_vol/flume/input/network.dat';
>>
>> B: {b: {(page: chararray,network: chararray,sysinfo:
>> chararray,trafficsource: chararray,search: chararray)}}
>> 2012-09-10 10:45:54,293 [main] ERROR org.apache.pig.tools.grunt.Grunt -
>> ERROR 1200: <file script5_snappy.pig, line 24, column 7>  mismatched input
>> '.' expecting INTO
>> Details at logfile: /root/.mohit/pigtest/pig_1347299107910.log
>>
>> --
>>
>> Can I do this without using foreach?
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