Deepak Janyavula
Deepak Janyavula

Reputation: 368

describe hive custom UDF documentation

I have created a custom UDF in Java which I can use in Hive. Can you let me know how/where I can add some documentation to this UDF?

I want to view this documentation while giving DESCRIBE FUNCTION <CUSTOM UDF> in hive.

Upvotes: 1

Views: 1478

Answers (1)

Jerome Banks
Jerome Banks

Reputation: 1630

Place an Annotation of type 'org.apache.hadoop.hive.ql.exec.Description' on your UDF class, with your description in the value field

For example

 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDF;

 @Description(name="fantastic",
    value="does the most fantastic thing ever")
 public class FantasticUDF extends UDF {

  ....
 }

Upvotes: 1

Related Questions