Hello I am having an issue with running a pig script.
Here is my pig script:
REGISTER 'python_udf.py' USING jython AS myfuncs;
dataframe = LOAD 'udftest.csv' using PigStorage(',') AS (x:int);
result1 = foreach dataframe generate myfuncs.testudf(x);
dump result1;
Here is my python script:
@schemaFunction("a:int")
def testudf(test):
a = test - 1
return a
The error I get is:
"Error during parsing. Could not resolve myfuncs.testudf using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.] Failed to parse: Pig script failed to parse: "
In the pig documentation it says under Decorators and Schemas
and
so try
as your decorator.