Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

dereferencing bag of map

$
0
0
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

Viewing all articles
Browse latest Browse all 5648

Trending Articles