I tried running the same with python which worked fine. I also added groovy to pig_classpath, I set groovy in $PATH Please find attached code sample which has python and groovy code along with their pig scripts.
Could you please help here? On Mon, Apr 14, 2014 at 5:45 PM, Chandramohan <[EMAIL PROTECTED]>wrote: emp.csv 1 CM 5000 2 TJ 4000 3 RN 5600 4 SJ 6345 5 RB 7325 6 AJ 7634 7 AR 9800
emp_g.pig register 'test.groovy' using groovy as myfuncs;
A = LOAD 'emp.csv' As(id:int, name:chararray, salary:long); B = FOR EACH A myfuncs.square(A.id); DUMP B; emp_py.pig Register 'test.py' using org.apache.pig.scripting.jython.JythonScriptEngine as myfuncs; A = LOAD 'emp.csv' As(id:int, name:chararray, salary:long); B = FOREACH A generate myfuncs.bonus(salary);