Deploying UDFs and UDAFs

To deploy your UDFs or UDAFs, complete the following steps from the impala-shell:
  1. Issue a USE statement to the database that you want to associate your new function with.
  2. Issue a CREATE FUNCTION statement in the impala-shell to make Impala aware of the new function.
    • To deploy a UDF, issue the CREATE FUNCTION statement.
    • To deploy a UDAF, issue the CREATE AGGREGATE FUNCTION statement. Specify the entry points of the underlying C++ functions using the clauses INIT_FN, UPDATE_FN, and FINALIZE_FN.
    Warning: You can also issue the CREATE FUNCTION with a fully qualified database name to skip the USE statement step. Example: CREATE FUNCTION <db_name.function_name>