Re: Add constant to pig output

2010-10-20 Thread Konstantin Ignatyev
g1 = LOAD 'data/grptest' USING PigStorage(',') AS ( a, b , c, d); r = FOREACH g1 GENERATE '$myconstant' as constant, a ; when called like this: pig [-x local] -param myconstant=zz

Add constant to pig output

2010-10-20 Thread John Hui
Hi, I have this pig script. 1 data = LOAD '$INPUT' USING PigStorage(',') AS (app:chararray, user:chararray, timestamp:int, duration:int); 2 3 appUserIn = FOREACH data GENERATE app, user; 5 distinctAppUserIn = DISTINCT appUserIn; 6 7 groupOnApp = GROUP distinctAppUserIn BY app; 8