Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - dereferencing bag of map


Copy link to this message
-
dereferencing bag of map
Jerry Lam 2013-06-18, 00:18
Hi Pig users,

anyone has experience in dereferencing a bag of maps? For instance (in the
example below), doc in the B contains maps of userId and time. I want to
keep only userId in C. Pig throws an exception on C. Any help is
appreciated.

A = LOAD 'data' AS doc:bytearray;

B = FOREACH A GENERATE (bag{})doc;

-- C = FOREACH B GENERATE doc.userId; // this doesn't work.

Best Regards,

Jerry