选择一个关系所有字段&关于PIG JOIN的其他关系中的一两个,怎么样?

时间:2014-03-06 12:32:41

标签: hadoop apache-pig

A = load '$input1' using pigStorage() AS (a,b,c,d,e)
B = load '$input2' using pigStorage() AS (a,b1,c1,d1,e1)
C = JOIN A by a, B by a; 
D = do something;

'D'应为格式(a,b,c,d,e,b1)

如何实现这一目标?

1 个答案:

答案 0 :(得分:2)

D = FOREACH C GENERATE A::a .. A::e, B::b AS b1;