<?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>question Re: Problem working with Hive Tables using python code in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/377137#M243148</link>
    <description>&lt;P&gt;Welcome to the community&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107187"&gt;@New_To_Hive&lt;/a&gt;.&amp;nbsp;While you wait form someone more knowledgable to reply, I thought I could at least point something out. I see the following&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask:17:16&lt;/LI-CODE&gt;
&lt;P&gt;I suggest double checking your Hive query for correctness and reviewing your Tez logs to see if they hold additional clues.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 13:45:27 GMT</pubDate>
    <dc:creator>cjervis</dc:creator>
    <dc:date>2023-10-02T13:45:27Z</dc:date>
    <item>
      <title>Problem working with Hive Tables using python code</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/377092#M243125</link>
      <description>&lt;P&gt;I was trying to use python query to extract data from Hive table and create a data frame. It gave me the following error at cursor.execute line.&lt;BR /&gt;&lt;BR /&gt;pyhive.exc.OperationalError: TExecuteStatementResp(status=TStatus(statusCode=3, infoMessages=['*org.apache.hive.service.cli.HiveSQLException:Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask:17:16', 'org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:348', 'org.apache.hive.service.cli.operation.SQLOperation:runQuery:SQLOperation.java:228', 'org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:265', 'org.apache.hive.service.cli.operation.Operation:run:Operation.java:260', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:575', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatement:HiveSessionImpl.java:550', 'org.apache.hive.service.cli.CLIService:executeStatement:CLIService.java:285', 'org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:567', 'org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1557', 'org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1542', 'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39', 'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39', 'org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor:process:HadoopThriftAuthBridge.java:647', 'org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:286', 'java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1149', 'java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:624', 'java.lang.Thread:run:Thread.java:748'], sqlState='08S01', errorCode=1, errorMessage='Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask'), operationHandle=None)&lt;BR /&gt;&lt;BR /&gt;Any resolution will be great.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:38:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/377092#M243125</guid>
      <dc:creator>New_To_Hive</dc:creator>
      <dc:date>2023-10-02T13:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem working with Hive Tables using python code</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/377137#M243148</link>
      <description>&lt;P&gt;Welcome to the community&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107187"&gt;@New_To_Hive&lt;/a&gt;.&amp;nbsp;While you wait form someone more knowledgable to reply, I thought I could at least point something out. I see the following&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask:17:16&lt;/LI-CODE&gt;
&lt;P&gt;I suggest double checking your Hive query for correctness and reviewing your Tez logs to see if they hold additional clues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:45:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/377137#M243148</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2023-10-02T13:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem working with Hive Tables using python code</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/379341#M243838</link>
      <description>&lt;DIV class="flex flex-grow flex-col max-w-full gap-3 gizmo:gap-0"&gt;&lt;DIV class="min-h-[20px] text-message peer flex flex-col items-start gap-3 whitespace-pre-wrap break-words peer-[.text-message]:mt-5 overflow-x-auto"&gt;&lt;DIV class="markdown prose w-full break-words dark:prose-invert dark"&gt;&lt;P&gt;The error you're encountering (OperationalError: TExecuteStatementResp(status=TStatus(statusCode=3, ...) indicates that there was an issue during the execution of the Hive query. The specific error message within the response is Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask.&lt;/P&gt;&lt;P&gt;Here are a few steps you can take to troubleshoot and resolve the issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check Hive Query Logs:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Review the Hive query logs to get more details about the error. The logs might provide information about the specific query or task that failed, including any error messages or stack traces.&lt;/LI&gt;&lt;LI&gt;You can find the logs in the Hive logs directory. The location may vary based on your Hadoop distribution and configuration.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Inspect Query Syntax:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Double-check the syntax of your Hive SQL query. Ensure that the query is valid and properly formed. Sometimes, a syntax error can lead to execution failures.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Verify Hive Table Existence:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Confirm that the Hive table you're querying actually exists. If the table or the specified database is missing, it can lead to errors.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check Permissions:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Verify that the user running the Python query has the necessary permissions to access and query the Hive table. Lack of permissions can result in execution errors.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Examine Tez Configuration:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If your Hive queries use the Tez execution engine, check the Tez configuration. Ensure that Tez is properly configured on your cluster and that there are no issues with the Tez execution.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Look for Resource Constraints:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The error message mentions TezTask, so consider checking if there are any resource constraints on the Tez execution, such as memory or container size limitations.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Update Python Library:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure that you are using a compatible version of the Python library for interacting with Hive (e.g., pyhive or pyhive[hive]). Updating the library to the latest version might help resolve certain issues.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Test with a Simple Query:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Simplify your query to a basic one and see if it executes successfully. This can help isolate whether the issue is specific to the query or a more general problem.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;After reviewing the logs and checking the mentioned aspects, you should have more insights into what might be causing the error. If the issue persists, consider providing more details about the Hive query and the surrounding context, so we can offer more targeted assistance.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Nov 2023 17:37:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-working-with-Hive-Tables-using-python-code/m-p/379341#M243838</guid>
      <dc:creator>ggangadharan</dc:creator>
      <dc:date>2023-11-21T17:37:34Z</dc:date>
    </item>
  </channel>
</rss>

