Never mind, it looks like the FLATTEN operator should do the trick. I'd only
seen it with tuples, didn't realize it did what I needed with inner bags
until I RTFM-ed again.

On Fri, Oct 14, 2011 at 10:53 PM, Pete Warden <[email protected]> wrote:

> Newbie question - I have an inner bag of tuples that I'd like to convert
> into an outer bag/relation and I'm struggling to figure out how
> For example if I have
> ({(1,2),(3,4),(5,6)}
> ({(7,8),(9,10)}
> I'd like it to become
> (1,2)
> (3,4)
> (5,6)
> (7,8)
> (9,10)
> The motivation behind that is a Cassandra field that contains a packed,
> variable-length data structure, a bit like a CSV string encoding multiple
> rows of data
> I can convert the raw char array into an inner bag of tuples but I need to
> 'explode' it to work properly with it
>
> I'm open to "don't do that, here's why it's a dumb idea", but it feels like
> I'm missing an operator that could be used to implement this. I have a
> partially-working solution using streaming, but the presence of new lines in
> the chararray makes that approach tough. Any advice much appreciated.
>
> cheers,
>            Pete
>

Reply via email to