apache pig - Pig calculating avg of delay fails -
i have file airplanes data, having airplane dest , delay(delay can negative or positve number)
a = load ‘flightdelays’ using pigstorage(‘,’); b = foreach generate $14 delay:int, $17 dest:chararray; c = group b all; -- failing cast error, error failed read data input file.. d =foreach c generate b.dest, avg(b.delay);
when execute , 0 records read source file , mapreduce job failed..
why not able calculate avg?
check extension/path of file.is file comma separated? also,there plenty of case issues script.
pigstorage - s small in load statement.
a = load ‘flightdelays’ using pigstorage(‘,’);
b = foreach generate $14 delay:int, $17 dest:chararray;
there no relation called a,b,c.you loading data relation , on.
Comments
Post a Comment