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

Switch to Plain View
Pig, mail # user - FLATTEN custom bags


Copy link to this message
-
FLATTEN custom bags
Aniket Mokashi 2011-02-17, 00:58
Hi,

I have a custom loader that creates and returns a tuple of id, bags. I
want to open these bags and get their contents.
For example-
data = load 'loc' using myLoader() as (id, bag1, bag2);
bag1Content = foreach data generate FLATTEN(bag1);
This works.

But when I do bag1Content = foreach data generate id, FLATTEN(bag1) --it
fails.
How should I fix it?

Thanks,
Aniket
+
Daniel Dai 2011-02-17, 02:47