Reply
Cloudera Employee
Posts: 32
Registered: ‎08-16-2016

Re: Error while running query on HIVE;

Could you please post the HMS log snippet please showing the full exception stack? Could you also post the output of select * from SEQUENCE_TABLE from your HMS metastore DB? Thanks

New Contributor
Posts: 2
Registered: ‎05-20-2018

Re: Error while running query on HIVE;

Hi Naveen,

 

Thanks for your reply.

As verified i could not find HMS logs.

and while executing command got same error as below.

 

hive> select * from SEQUENCE_TABLE
> ;
FAILED: SemanticException Unable to fetch table sequence_table. Exception thrown when executing query : SELECT DISTINCT 'org.apache.hadoop.hive.metastore.model.MTable' AS `NUCLEUS_TYPE`,`A0`.`CREATE_TIME`,`A0`.`LAST_ACCESS_TIME`,`A0`.`OWNER`,`A0`.`RETENTION`,`A0`.`IS_REWRITE_ENABLED`,`A0`.`TBL_NAME`,`A0`.`TBL_TYPE`,`A0`.`TBL_ID` FROM `TBLS` `A0` LEFT OUTER JOIN `DBS` `B0` ON `A0`.`DB_ID` = `B0`.`DB_ID` WHERE `A0`.`TBL_NAME` = ? AND `B0`.`NAME` = ?
hive>

 

AND MY HIVE-SITE.XML Configuration is as below

 

<configuration>

<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>

<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
</configuration>

 

can u please help me if these are any more tags needs to be added to my xml.

exception.JPG

Highlighted
New Contributor
Posts: 1
Registered: ‎10-16-2018

Re: Error while running query on HIVE;

[ Edited ]

Can you please check database name, which are being used while creating table. As you are not using any database name in the query, might be its pointing to some other database on which you might not have access.

Explorer
Posts: 18
Registered: ‎10-04-2017

Re: Error while running query on HIVE;

[ Edited ]

Please check DB name and make sure Table is not existed already 

Announcements