L = FOREACH G GENERATE group, FLATTEN(f2); That should do it. Did you try that? Is there any reason it did not?
2010/12/28 Michael Moss <[email protected]> > Hello, All. > > I have what I hope is a quick, noob question, but I am having trouble > flattening one of my relations, G. > > >DESCRIBE G; > G: {group: int,f2: {group::f2: int}} > > >ILLUSTRATE G; > -------------------------------------------------- > | G | group: int | f2: bag({group::f2: int}) | > -------------------------------------------------- > | | 1 | {(2), ..., (5)} | > | | 2 | {(3), (4), (5)} | > | | 3 | {(4), (5)} | > | | 4 | {(5)} | > -------------------------------------------------- > > > >DUMP G; > (1,{(2),(3),(4),(5)}) > > The problem is, when I dump this to a file, I have: > 1,{(2),(3),(4),(5)} > > I'd like to end up with: > 1,2,3,4,5 > > Is this possible? > > Thanks. >
