Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Create function every time impala restart

avatar
Explorer

Hi,

 

I have create a UDF in impala but every time I am restarting it the UDF is gone. Is there anyway to fix this issue ? 

 

 

create function my_udf(String,String,String) returns boolean location 'udfs-1.0-SNAPSHOT-jar-with-dependencies.jar' SYMBOL='MyUDF ;

2 REPLIES 2

avatar
Expert Contributor

@drgeniousYou can create a function like below. 

CREATE FUNCTION [IF NOT EXISTS] [db_name.]function_name LOCATION 'hdfs_path_to_jar' SYMBOL='class_name'

For more information please refer below doc.
https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_create_function.html#create_...

avatar
Explorer

Hi @balajip 

 

I know how to create a UDF. My problem is that every time I restart impala the udf is gone. Is there any way to keep UDF after the restart or I have to create it every time ?