我有以下数据:
AGE,EDU,SEX,SALARY
67,10th,Male,<=50K
17,10th,Female,<=50K
40,Assoc-voc,Male,>50K
35,Assoc-voc,Male,<=50K
57,Assoc-voc,Male,<=50K
49,Assoc-voc,Male,>50K
42,Bachelors,Male,>50K
30,Bachelors,Male,>50K
23,Bachelors,Female,<=50K
==================================================== ======
我的猪拉丁文脚本是:
sensitive = LOAD '/mdsba' using PigStorage(',') as (AGE,EDU,SEX,SALARY);
--Filtered the data by the city
Data_filter1 = FILTER sensitive by (SALARY matches '<=50K');
Data_filter2 = FILTER sensitive by (SALARY matches '>50K');
BA= group Data_filter1 by (EDU,SEX) ;
BB= foreach BA generate group as EDU, COUNT (Data_filter1) as cn:int;
BC= FILTER BB by (cn == 4);
Dump BC ;
错误信息:
java.lang.ClassCastException:java.lang.Integer 无法转换为 java.lang.Long
请有任何帮助