...
In Hive 0.13 or later, functions can be registered to the metastore, so they can be referenced in a query without having to create a temporary function each session.
Create Function
Info | ||
---|---|---|
| ||
As of Hive 0.13.0 (HIVE-6380) |
Code Block |
---|
CREATE FUNCTION [db_name.]function_name AS class_name [USING JAR|FILE|ARCHIVE 'file_uri' [, JAR|FILE|ARCHIVE 'file_uri'] ] |
...
The function will be added to the database specified, or to the current database at the time that the function was created. The function can be referenced by fully qualifying the function name (db_name.funciton_name), or can be referenced without qualification if the function is in the current database.
Drop Function
Info | ||
---|---|---|
| ||
As of Hive 0.13.0 (HIVE-6380) |
Code Block |
---|
DROP FUNCTION [IF EXISTS] function_name |
...