lsc = LOAD '/user/hadoop/radio_event/listenerStateChange/2010-06-30'
   AS (daterecorded:chararray, listener_id:long, to_state:chararray, 
from_state:chararray);
describe lsc;
lscg = group lsc by (from_state, to_state);
describe lscg;
//lsccnt = FOREACH lscg generate group.from_state, group.to_state, 
COUNT(lsc.listener_id);
lsccnt = FOREACH lscg generate group.from_state, group.to_state, COUNT(lsc);

The first lsccnt line generates (,,0L) and the second generates (,,54321);
What I want is tuples like
        (state1,state2,123)
        (state3,state2,456

And so on for each combination of from_state and to_state.

What am I missing?

elein
[email protected]




Reply via email to