Four Stars

tHiveRow and error

Hi there!


I'm trying just to make a simple example to connect to Hive and make a simple query. However, I got an error, because generated source code for the tHiveRow component uses a variable (log) which is not declared..


The tHiveConnection component works fine, and connect properly...


Any thoughts?


Thanks in advance!



Seven Stars

Re: tHiveRow and error

The "log" variable is internal to Talend. I don't think that's the problem (despite what the error message says): the problem is likely in your query, which is the line above the one throwing the error.


When I have a Talend job using a query that won't compile, it's inevitably because I forgot to enclose the query itself in double-quotes. Failing that, it is some similar error in the query that prevents it from compiling. You're best bet is to create a Hive query object in Metadata | DbConnections, which will let you test the query outside of the Talend job.



Four Stars

Re: tHiveRow and error

I'll try your suggestion, but my query is alredy quoted in double ".


But, actually, it is too strange.. Currently I'm using 6.5.1 version. In the version 6.4.1, the component tHiveRow has not the ""..")" line, so, doing the same process, there is not an error at all.


But, anyway, I'll try your solution to create a Hive query object in the metadata..





One Star

Re: tHiveRow and error



I'm facing the same issue with tHiveRow and (6.5.1 version). I tried adding other components but it doesn't help. The syntax of my query is correct. To test tHiveRow I am using the same query than in tHiveLoad.  Did you find a solution?

Thanks in advance for the comments.


Four Stars

Re: tHiveRow and error

I'm having the same issue.

Looks like a bug to me, not a query string problem.  Happens with default query "select id, name from employee".


Java code definitely has an undefined variable, log."Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): "
+ queryIdentifier + "]");


It's very easy to reproduce.  Just add a tHiveRow, look at the source.


Is there some logging option or component to cause the internal log variable to be created as a work around?

It looks like log4J code.  Maybe there is a runtime option to turn on log4j logging for the application so it gets generated. 


I'm kinda stuck as I have an issue with logging into hive from a trusted domain in 6.4.1 with cloudera 5.10.  Talend 6.5.1 works for the  connection, but then I have this problem.




Four Stars

Re: tHiveRow and error

I honestly think it is a bug. It's looks like any programmer forgot to remove the log, testing the tHiveRow component. I did report it to the talend bug tracker..


The only solution I found was go back to the 6.4.1. The is not added in the 6.4.1 version, so it is works perfectly.




Re: tHiveRow and error


Here exists a work item jira issue:

Best regards


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