rahul
rahul

Reputation: 1473

Pig UDF loading issue

I am not able to use the 2 UDF's together

REGISTER 'pig.jar';
REGISTER 'piggybankjar';
DEFINE UnixToISO org.apache.pig.piggybank.evaluation.datetime.convert.UnixToISO();
DEFINE ToDate org.apache.pig.builtin.ToDate();

This is the error that I am getting : Could not infer the matching function for org.apache.pig.piggybank.evaluation.datetime.convert.UnixToISO as multiple or none of them fit. Please use an explicit cast.

When I do not register the pig.jar, this error goes away, but then it fails to load the ToDate UDF?

Am I missing something basic here? Any help is greatly appreciated. Thanks

Upvotes: 0

Views: 1791

Answers (1)

fuRy
fuRy

Reputation: 81

I had encountered a similar error while working with Pig.Till now, in all the cases that I have encountered, this error message is misleading. I had the same error for in-built SUM function. After thorough analysis, I realised I was passing the wrong input to the SUM function and the problem was with GROUPing. So I would suggest that you verify your pig-script again ; chances are there is something else wrong most probably some wrong relation being supplied down the flow.

Upvotes: 1

Related Questions