<?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 JDBC4 Hive Driver error: Only AEQuery is supported. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JDBC4-Hive-Driver-error-Only-AEQuery-is-supported/m-p/49223#M51120</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to execute a simple hiveql statement like the following: insert into table1 select * from table2.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Both tables have the same schema but different store options, that is, table1 is stored as avro and table2 as parquet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied jdbc4 driver to project's location and I can obtain a connection to hiveserver2 without any issues. However, when I try to execute the above query, the following exception occurrs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Only AEQuery is supported.
java.sql.SQLException: Only AEQuery is supported.
	at com.cloudera.hive.hive.querytranslation.HiveQueryTranslator.translate(HiveQueryTranslator.java:86)
	at com.cloudera.hive.hive.querytranslation.HiveQueryTranslator.translate(HiveQueryTranslator.java:74)
	at com.cloudera.hive.hivecommon.dataengine.HiveJDBCDSIExtQueryExecutor.execute(HiveJDBCDSIExtQueryExecutor.java:168)
	at com.cloudera.hive.jdbc.common.SStatement.executeNoParams(SStatement.java:2719)
	at com.cloudera.hive.jdbc.common.SStatement.execute(SStatement.java:549)
	at py.com.personal.hive.HiveDataLoad.insert(HiveDataLoad.java:46)
	at InsertTest.testHiveInsert(InsertTest.java:23)
Caused by: com.cloudera.hive.support.exceptions.ErrorException: Only AEQuery is supported.&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Can somebody please tell me what I'm doing wrong or how this can be solved?&lt;BR /&gt;&lt;BR /&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (this.conn == null) {
            this.conn = this.cm.connect();
        }
        
        Statement stmt = this.conn.createStatement();
        String sql = "INSERT INTO " + toTable + " SELECT * FROM " + fromTable;
        stmt.execute(sql);
        stmt.close();&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:53:36 GMT</pubDate>
    <dc:creator>jsoft88</dc:creator>
    <dc:date>2022-09-16T10:53:36Z</dc:date>
    <item>
      <title>JDBC4 Hive Driver error: Only AEQuery is supported.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JDBC4-Hive-Driver-error-Only-AEQuery-is-supported/m-p/49223#M51120</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to execute a simple hiveql statement like the following: insert into table1 select * from table2.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Both tables have the same schema but different store options, that is, table1 is stored as avro and table2 as parquet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied jdbc4 driver to project's location and I can obtain a connection to hiveserver2 without any issues. However, when I try to execute the above query, the following exception occurrs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Only AEQuery is supported.
java.sql.SQLException: Only AEQuery is supported.
	at com.cloudera.hive.hive.querytranslation.HiveQueryTranslator.translate(HiveQueryTranslator.java:86)
	at com.cloudera.hive.hive.querytranslation.HiveQueryTranslator.translate(HiveQueryTranslator.java:74)
	at com.cloudera.hive.hivecommon.dataengine.HiveJDBCDSIExtQueryExecutor.execute(HiveJDBCDSIExtQueryExecutor.java:168)
	at com.cloudera.hive.jdbc.common.SStatement.executeNoParams(SStatement.java:2719)
	at com.cloudera.hive.jdbc.common.SStatement.execute(SStatement.java:549)
	at py.com.personal.hive.HiveDataLoad.insert(HiveDataLoad.java:46)
	at InsertTest.testHiveInsert(InsertTest.java:23)
Caused by: com.cloudera.hive.support.exceptions.ErrorException: Only AEQuery is supported.&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Can somebody please tell me what I'm doing wrong or how this can be solved?&lt;BR /&gt;&lt;BR /&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (this.conn == null) {
            this.conn = this.cm.connect();
        }
        
        Statement stmt = this.conn.createStatement();
        String sql = "INSERT INTO " + toTable + " SELECT * FROM " + fromTable;
        stmt.execute(sql);
        stmt.close();&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:53:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JDBC4-Hive-Driver-error-Only-AEQuery-is-supported/m-p/49223#M51120</guid>
      <dc:creator>jsoft88</dc:creator>
      <dc:date>2022-09-16T10:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: JDBC4 Hive Driver error: Only AEQuery is supported.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JDBC4-Hive-Driver-error-Only-AEQuery-is-supported/m-p/49264#M51121</link>
      <description>&lt;P&gt;The statement should be insert into **TABLE** toTable&amp;nbsp;select * from fromTable, instead of insert into toTable select * from table. Hope this helps somebody else.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 18:36:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JDBC4-Hive-Driver-error-Only-AEQuery-is-supported/m-p/49264#M51121</guid>
      <dc:creator>jsoft88</dc:creator>
      <dc:date>2017-01-10T18:36:50Z</dc:date>
    </item>
  </channel>
</rss>

