我正在尝试
select * from A where A.ID NOT IN (select id from B) (in sql)
filtersource= FILTER source BY ID NOT(destination.ID)
如何使用NOT IN子句或其他技术来清除一个表中使用猪的额外记录
答案 0 :(得分:0)
是的,你可以在PIG中这样做:
filtersource= FILTER source BY NOT ID IN (your condition or joined field);
示例:
HIVE> select * from table where id NOT IN ('1','2','3');
grunt> A = LOAD 'db.table' USING org.apache.hive.hcatalog.pig.HCatLoader() AS (id:int, value:chararray);
grunt> B = FILTER A BY NOT id IN (1,2,3);
答案 1 :(得分:0)