To use the reference udf:
-
Create a folder containing the jar file in the unix environment;
-
ADD JAR path/reference.jar;
-
ADD FILE reference_file.txt;
-
LIST JARS; //verify the jar
-
LIST FILES; //verify the reference file
-
CREATE TEMPORARY FUNCTION reference AS 'pkg.UDFReference';
Then use the udf inside hive passing the file added to the hadoop distributed cache as second argument.