Five Stars

Registering Hive UDF's - thiveinput

How to use a function with thiveinput or thiverow?
in shell:
$HIVE -e "
create temporary function findInMsg as 'com.test.hive.FindInMessage';
select
findInMsg('country', message),
from
table;
"
My error with talend component:
java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:194)
I tried to make a tHiveRow first to execute the temporary function, and after tHiveInput to select data...but it's not working.
any solution to use Hive UDF's?
3 REPLIES
Employee

Re: Registering Hive UDF's - thiveinput

Hi,
Which kind of connection do you use? Embedded? Standalone? What is the configuration of your component in Talend?
Cheers,
Five Stars

Re: Registering Hive UDF's - thiveinput

Hi,
tHiveConnection:
MapR / MapR 3.0.1
--> Connection mode: standalone / Hive Server: Hive 1
what does it mean? standalone?embedded? what's the difference?

I'm not using option "Register a shared DB connection"
tHiveRow / tHiveIput --> use an existing connection.

Thanks for your help
Employee

Re: Registering Hive UDF's - thiveinput

Hi,
Using the standalone mode, you connect to the Hive server through JDBC. The logs are located on the cluster side. You should open the logs on the cluster side in order to get more details.
Cheers,