Web
Analytics
hive udf example | Angular | ASP.NET Tutorials

For Consultation : +91 9887575540

Stay Connected :

Hive functions

Command :

SHOW FUNCTIONS  (to see all  in-built functions)

  • To show Complete details of in-built function.

Descibe function concat

Calling Functions:

Select  concat(fname,lname) as fullname from emp

Functions Types

1. Standard Functions : round(), floor(), abs(), reverse(), cocat() , ucase()

2. Aggregate , Functions:Sum(), avg(), min(),max()

3. Table Generating Functions:explode(),array()

Types of UDF

  • 1. Regular UDF: operates on a single row and produces a single row as its output.
  • 2. User Defined Aggregate functions: works on multiple input rows and creates a single output row.
  • 3. User defined table generated functions: operates on a single row and produces multiple rows—a table—as output.

Conditions of UDF

  • • A UDF must be a subclass of org.apache.hadoop.hive.ql.exec.UDF.
  • • A UDF must implement at least one evaluate() method.