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

Switch to Plain 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
+
Pradeep Gollakota 2013-06-18, 00:22
+
Suresh Saggar 2013-06-21, 09:43
+
Shahab Yunus 2013-06-21, 12:35
+
Pradeep Gollakota 2013-06-21, 12:42
+
Suresh Saggar 2013-06-24, 09:25
+
Abhinav Neelam 2013-06-25, 13:05
+
Suresh Saggar 2013-07-03, 08:58