<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error while running tHiveInput: Required field 'statement' is unset! in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259771#M41133</link>
    <description>&lt;P&gt;Yes. It was working fine till day-before-yesterday. Anything would've been changed on the server ?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2018 10:11:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-20T10:11:25Z</dc:date>
    <item>
      <title>Error while running tHiveInput: Required field 'statement' is unset!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259769#M41131</link>
      <description>&lt;P&gt;I am getting below exception while running tHiveInput.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Exception in component tHiveInput_3
java.sql.SQLException: org.apache.thrift.protocol.TProtocolException: &lt;FONT color="#FF0000"&gt;Required field 'statement' is unset!&lt;/FONT&gt; Struct:TExecuteStatementReq(sessionHandle:TSessionHandle(sessionId:THandleIdentifier(guid:0A 1E 83 20 4B 82 49 39 88 34 B6 51 61 17 CE CF, secret:DE D2 53 37 7B EC 40 7C 9C 67 11 3F 36 D2 5D DA)), statement:null, confOverlay:{}, runAsync:true, queryTimeout:0)
	at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:308)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:241)
	at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:437)
Caused by: &lt;FONT color="#FF0000"&gt;org.apache.thrift.protocol.TProtocolException: Required field 'statement' is unset!&lt;/FONT&gt; Struct:TExecuteStatementReq(sessionHandle:TSessionHandle(sessionId:THandleIdentifier(guid:0A 1E 83 20 4B 82 49 39 88 34 B6 51 61 17 CE CF, secret:DE D2 53 37 7B EC 40 7C 9C 67 11 3F 36 D2 5D DA)), statement:null, confOverlay:{}, runAsync:true, queryTimeout:0)
	at org.apache.hive.service.cli.thrift.TExecuteStatementReq.validate(TExecuteStatementReq.java:633)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args.validate(TCLIService.java:5063)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args$ExecuteStatement_argsStandardScheme.write(TCLIService.java:5120)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args$ExecuteStatement_argsStandardScheme.write(TCLIService.java:5089)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args.write(TCLIService.java:5040)
	at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:71)
	at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
	at org.apache.hive.service.cli.thrift.TCLIService$Client.send_ExecuteStatement(TCLIService.java:223)
	at org.apache.hive.service.cli.thrift.TCLIService$Client.ExecuteStatement(TCLIService.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1374)
	at com.sun.proxy.$Proxy0.ExecuteStatement(Unknown Source)
	at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:299)
	... 5 more&lt;/PRE&gt; 
&lt;P&gt;I am using:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Talend Open Studio for Big Data (7.0.1.20180411_1414)&lt;/P&gt; 
&lt;P&gt;OS: Windows 10 Pro&lt;/P&gt; 
&lt;P&gt;Hadoop Distribution:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 864px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1B0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144829iB5ACA0DC67D71A29/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1B0.png" alt="0683p000009M1B0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It was working fine for me till yesterday. Not sure what could be the issue ! Please help.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Note: I don't have winutils.exe running in my machine.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;CC:&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsaeAAC" target="_blank"&gt;@xdshi&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259769#M41131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T07:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running tHiveInput: Required field 'statement' is unset!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259770#M41132</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Did you select the good distribuation version for your tHiveInput? Is this connection OK with you?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 06:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259770#M41132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-20T06:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running tHiveInput: Required field 'statement' is unset!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259771#M41133</link>
      <description>&lt;P&gt;Yes. It was working fine till day-before-yesterday. Anything would've been changed on the server ?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 10:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259771#M41133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-20T10:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running tHiveInput: Required field 'statement' is unset!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259772#M41134</link>
      <description>&lt;P&gt;Solved. Looks like problem with changing the component from tJavaRow to tJavaFlex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My desgin was&lt;/P&gt;
&lt;PRE&gt;tFileInputDelimited -&amp;gt; tJavaRow -&amp;gt; tFlowToIterate -&amp;gt; tHiveInput -&amp;gt; tFileOutputDelmited&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was passing&amp;nbsp;&amp;nbsp;&lt;EM&gt;((String)globalMap.get("query")) as a value&amp;nbsp;&lt;/EM&gt; to tHiveInput as per above flow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as i have changed my design as below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;tFileInputDelimited -&amp;gt; tFlowToIterate -&amp;gt; tJavaFlex -&amp;gt; tHiveInput -&amp;gt; tFileOutputDelimited&lt;/PRE&gt;
&lt;P&gt;And I forgot to change&amp;nbsp;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;((String)globalMap.get("query"))&lt;/FONT&gt; to &lt;STRONG&gt;&lt;FONT color="#008000"&gt;query &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;FONT color="#000000"&gt;in&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;tHiveInput, so it didn't recognize the globalMap and was throwing this error.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Now I have modified it to &lt;STRONG&gt;query&amp;nbsp;&lt;/STRONG&gt;and it is working fine now.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks for the source code below, so that i was able to debug through "HiveStatement.java" to find the root cause of issue.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;A href="https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 13:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-running-tHiveInput-Required-field-statement-is-unset/m-p/2259772#M41134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-20T13:25:45Z</dc:date>
    </item>
  </channel>
</rss>

