- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to create impala UDF common to all database instead select one by one?
- Labels:
-
Apache Impala
Created on ‎01-22-2017 01:01 PM - edited ‎09-16-2022 03:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
Created ‎01-23-2017 03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Akhil,
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.
Created ‎01-23-2017 03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Akhil,
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.
Created ‎01-30-2017 12:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the solution, It works!!
