User defined sql query in tHiveInput component not working

One Star

User defined sql query in tHiveInput component not working

Hi,
I am trying to mention a min() function where clause (sub query) in one of my 'tHiveInput' component as below:-
"select 
agents_updates.col1,

agents_updates.col2
FROM tl.agents_updates
WHERE agents_updates.loadtime = (Select min(t2.loadtime) from tl.agents_updates t2)"
I am getting below error any suggestions please:-
connecting to socket on port 3630
connected
Exception in component tHiveInput_3
java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:392)
at bi_poc_mi.j1000_stg_agency_diff_lake_to_vault_min_wip_0_1.J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.tHiveInput_3Process(J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.java:4986)
at bi_poc_mi.j1000_stg_agency_diff_lake_to_vault_min_wip_0_1.J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.runJobInTOS(J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.java:8097)
at bi_poc_mi.j1000_stg_agency_diff_lake_to_vault_min_wip_0_1.J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.main(J1000_Stg_Agency_Diff_Lake_To_Vault_Min_WIP.java:7942)
Moderator

Re: User defined sql query in tHiveInput component not working

Hi,
Is your defined sql query working  well on your hive cluster without using thiveinput component? On which build version you got this issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: User defined sql query in tHiveInput component not working

Hi Sabrina,
Thanks for the reply and apologies for the late response.Yes the queries are working in HQL editor (like HUE) but not working tHiveinput componet.I am using TalendOpenStudio6.1 for Bigdata edition.
Cheers,
Two Stars

Re: User defined sql query in tHiveInput component not working

avez vous une idée sur cette erreur

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

Moderator

Re: User defined sql query in tHiveInput component not working

Hello,

What's does your sql query look like? Are you using ‘Where' clause in the query? Does it work if you remove the clause?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.