On Sat, Oct 16, 2010 at 3:55 PM, Eric Lee <e...@c11software.com> wrote:

> I have this working now with the following:
>
> rows = LOAD 'cassandra://TwitterExample/User' using CassandraStorage();
> *cols = FOREACH rows GENERATE
> FLATTEN((bag{tuple(chararray,chararray)})$1);*
> users = FOREACH cols GENERATE $1;
>
> Not sure if that operation with *cols *is correct or not, but it appears
> to be working. Any thoughts would be appreciated.
>

You can do what you want in a single pass by dereferencing the bag:

rows = LOAD 'cassandra://TwitterExample/User' USING CassandraStorage() AS
(key, columns: bag {T: tuple(name, value)});
values = FOREACH rows GENERATE columns.value;

-Brandon

Reply via email to