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

Switch to Threaded View
Pig >> mail # user >> FLATTEN custom bags


Copy link to this message
-
FLATTEN custom bags
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