A1 = LOAD 'Sandeep Rohan Mohan' USING PigStorage() AS (line:chararray);
B1 = LOAD 'MOHAN' USING PigStorage() AS (line:chararray);
A = FOREACH A1 GENERATE UPPER(line) AS line;
B = FOREACH B1 GENERATE UPPER(line) AS line;
C = COGROUP A BY line, B BY line;
D = FILTER C BY IsEmpty(B);
E = FOREACH D GENERATE group AS name;
DUMP E;
2条答案
按热度按时间u4vypkhs1#
试试这个:
(罗汉)(桑德普)
另请参阅apache pig中的set操作
vsmadaxz2#
它是通过左外连接实现的,只考虑那些在$1中有空值的元组