pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddhi Mehta <sm26...@gmail.com>
Subject Using Hive UDF in pig
Date Wed, 13 Apr 2016 00:51:22 GMT
Hey Guys,

I have created a custom Hive UDF and have registered it as a permanent
function using

CREATE FUNCTION myfunc AS 'com.package.mycustomfunc' USING JAR
'applog-udf.jar', FILE 'distributedcachedir;

I want to make use of the same hive udf in pig as per jira PIG-3294

I am able to successfully use the udf if I define it using the full class

define myfunc HiveUDF('com.package.mycustomfunc');

My assumption was that custom UDF's can also be defined using the
functionName/alias rather than the classname.

When I try to do the same I keep getting errors since it cannot resolve the
udf name using builtins

define myfunc HiveUDF('default.myfunc');

Is this assumption correct or do custom hive udf's need to be referenced
via their full class name


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message