Member since
03-05-2019
2
Posts
0
Kudos Received
0
Solutions
02-10-2021
01:23 AM
Hi Zara, You need to check a couple of things - which may give more clues on the why. 1. Are you using the latest Hive JDBC driver? (is it HDP or CDH/CDP?) Check out https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-11.html 2. Do you get the same error if you use backticks for the database name and/or for the table name? select count(*) from `dbname`.`tablename` where partition_key='xxxxx'; 3. Did you look at the HiveServer2 logs? What do they show you? What was the real query submitted to the HS2 and what was the failure there? What does it look like for a non-partitioned table? 4. The "UseNativeQuery" option of the JDBC driver sometimes can solve such interesting issues - as it is a flag whether the Hive query is already translated to a Hive native format. Check the docs. https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-11/Cloudera-JDBC-Driver-for-Apache-Hive-Install-Guide.pdf 5. Also you can turn on debug level logs at the JDBC driver side, see LogLevel and LogPath JDBC connection string properties.
... View more