I would like to generate combinations in pig with the help of FOREACH. Is there any possible way to do this ?
My Input:
A
B
C
Objective:
A,B
A,C
B,C
Here's the sample which I have tried. This sample shows " Syntax error, unexpected symbol at or near '$0' ".
A = load '/test';
B = foreach A generate $0;
Combination = Cross A, B;
Combination_Filter = foreach Combination generate $0 < $1;
Please help me in resolving this. Thanks in Advance