Re: comparing two files using pig

2013-06-21 Thread Barclay Dunn
hef On Jun 21, 2013, at 6:14 AM, Siddhi Borkar wrote: Thanks a lot the solution worked fine. Is it possible also to display the comma separated matching d's? For ex (q1,2, {d1,d2}) (q2,0) (q3,0) -Original Message- From: Chris Hokamp [mailto:chris.hok...@gmail.com] Sent: F

Re: comparing two files using pig

2013-06-20 Thread Barclay Dunn
BY $0; J0 = FOREACH H0 GENERATE $0, COUNT($1); J1 = FOREACH H1 GENERATE $0, 0; K = UNION J0, J1; DUMP K; /* (q2,0) (q3,0) (q1,2) */ Barclay Dunn On 6/20/13 10:07 AM, Jacob Perkins wrote: Hi, This should just be a simple cogroup. A = load 'file1.txt' as (q:chararray, d:chararray)

Re: A question on joins

2013-06-19 Thread Barclay Dunn
it turns out that "output" is a reserved word in Pig. if you change your alias to "thingy" your script will work. Barclay Dunn On 6/19/13 3:10 AM, Sameer Tilak wrote: Dear Pig users, I am trying to do simple joins by following an example on a Blog. Your