I have a complex tuple with bags and tuples. How do I flatten it and access the bags?
I tried this code:
X = ({(a,b)},{(c,d),(e,f)},({(c,d),(e,f)},{g}),({(c,d),(e,f)},{h}))
Y = FOREACH X flatten($0);
Y = FOEACH Y GENERATE Y.$0;
But this doesn't seem to return the first bag.
Is there a way to return the first bag without using a UDF?