2016-09-16 118 views

回答

1
-- split into 2 datasets 
SPLIT Input_data INTO A IF Field > 0, B if Field <= 0; 

-- count > 0 records 
A_grp = GROUP A ALL; 
A_count = FOREACH A_grp GENERATE COUNT(A); 

-- count <= 0 records 
B_grp = GROUP B ALL; 
B_count = FOREACH B_grp GENERATE COUNT(B); 

希望這會有所幫助!