我有一些数据,比如: type1, 2type1, 3type1, 5type1, 1type3, 5 我想按类型对它们进行分组,预期结果应该是: type1, 11type3, 10 下面是我的PIG脚本: data = LOAD 'my_data.txt' USING
a = GROUP data
我试图在pig中对我的数据执行sum操作,但它不接受显式类型转换,我尝试在执行sum时将(int)替换为double。timedata by $0;
drivinfo = foreach drivgrp generate group as id , SUM(timedata.$2) as totalhr , SUM(- ERROR 1045: <line 10, column 41> Could not infer the matching function
我想在Amazon上加速一个简单的Apache (0.13.1)或Pig (版本0.12.0)的聚合工作。我的数据已经在需要聚合的键上排序了,我希望作业能够利用这一点。(occurrences) from ngrams where year >= 1910 group by gram;summed = FOREACH grouped GENERATE group, SUM</
我在google n-gram数据集上的pig上运行了以下命令:
sum_occ = FOREACH groupinp GENERATE FLATTEN(group) as ngram, SUM(filter_input.occurencesfeatures used in the script: <em
我有两个数据集,EmployeeDetail包含4列(id、name、性别、位置)和SalaryDetail(id、工资)。我加入了这两个数据集,并将它们分组为位置。<line 11, column 58> Could not infer the matching function for org.apache.pig.builtin.AVG as multipleAverageSalary = foreach GroupedByLocation {
Sum =