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 >> Passing a single Bag to an Eval function


Copy link to this message
-
Passing a single Bag to an Eval function
I am trying to use an EVAL pig function (it's called BagSplit from datafu)
which accepts a Bag as a parameter.

The problem I have is that my current relation is a single Bag, so I'm not
sure how to pass this relation to the Eval function.

My pig script looks like this:

F = FOREACH E GENERATE $0,$1;

DESCRIBE F;

F: {id: chararray,countd: long}

G = FOREACH F GENERATE BagSplit(??);

Not sure what I can put in ??

Thanks,
James
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