iamthechad
3/7/2017 - 6:31 PM

count_by_year.pig

countByYear = FOREACH groupByYear 
>> GENERATE group AS YearOfPublication, COUNT($1) AS BookCount; 

DESCRIBE countByYear; 
countByYear: {YearOfPublication: int,BookCount: int}