I am trying to write a Hive UDF using Scala. This UDF should run a query on another hive table and return the obtained value
For eg. I have a master table in hive with columns emp_id,start_date,end_date,salary. I am trying to come up with a hive udf using scala to create a function(getSal) where I can pass id and some date and get the effective salary for that id in another hive query as select *, getSal(emp_id,passed_date) as salary from some table;
Can you tell me how to achieve this?
note - i can get the details by joining my table with master table and running between clause but would like to explore the UDF solution.