01-22-2017 01:01 PM
I've more than one database in impala, I want to create UDF in c++ which will be common to all databases similar to build in functions. Is there is any way to avoid creating same functions in each databse?
if I've two database DB1 and DB2 and I want to add a UDF to_upper_case() in each of these, I need to select each database by using USE <database_name> command and then I've add UDF in each.
is there any way to create to_upper_case() UDF such that it will be common for DB1 and DB2 ?
01-23-2017 03:07 PM
The only way I can think of to achieve this is to refer the udf by its fully-qualified name. E.g. if you create a function "my_fn" in a database "my_db" you can call it as my_db.my_fn() from any database.