Member since
03-05-2019
2
Posts
0
Kudos Received
0
Solutions
01-20-2021
02:12 AM
Hi All, Currently we are building a Java application to connect hive database to perform data transfer. We are encountering issue while issuing the below query through java application "select count(*) from tablename where partition_key='xxxxx'". The above table is partitioned by partition_key column. below is the complete error log from Java ### Error querying database. Cause: java.sql.SQLException: [Cloudera][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: [Cloudera][JSQLEngine](12010) The table "dbname"."tablename" could not be found., SQL state: HY000, Query: select count(*) from dbname.tablename where partition_key='201912310002' . ### The error may exist in com/hds/datatransfer/mapper/hive/HiveRepository.java (best guess) ### The error may involve com.hds.datatransfer.mapper.hive.HiveRepository.test1 ### The error occurred while executing a query ### SQL: select count(*) from dbname.tablename where partition_key='201912310002' ### Cause: java.sql.SQLException: [Cloudera][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: [Cloudera][JSQLEngine](12010) The table "dbname"."tablename " could not be found., SQL state: HY000, Query: select count(*) from dbname.tablename where partition_key='201912310002' . This table is stored as ORC file format Note: same query if I run it in any editor, it is working fine. And also we observed that if Java application perform count operation on non partition table, it is working. We are unsure about this strange behavior, can you please help me on this. Thanks!
... View more
Labels:
- Labels:
-
Apache Hive