Feedback
Did this article resolve your question/issue?

   

Article

Unexpected zero rows returned from Connection.getMetaData().getColumns() call using Hive JDBC driver

Information

 
TitleUnexpected zero rows returned from Connection.getMetaData().getColumns() call using Hive JDBC driver
URL Nameunexpected-zero-rows-returned-from-connection-getmetadata-getcolumns-call-using-hive-jdbc-driver
Article Number000174154
EnvironmentProduct: Progress DataDirect for JDBC for Apache Hive Driver
Version : 6.0.1.000139
OS: JAVA
Database : Hive
Application: All supported applications
Question/Problem Description

When making the following function call, Connection.getMetaData().getColumns(), using the Hive JDBC Driver (6.0.1.000139) against Hive database server 3.1.x, it returned 0 rows.
But when the same function was called using the release version of the driver (6.0.1.000081), correct number of rows were returned.
Steps to Reproduce
Clarifying Information
Error Message(MetaException(message:java.lang.UnsupportedOperationException: Storage schema reading not supported)
Defect Number
Enhancement Number
Cause
Snoop logs shows the following error when getColumns() method was called:
(MetaException(message:java.lang.UnsupportedOperationException: Storage schema reading not supported)
Resolution

In the hive_site.xml, set the following and restart the Hive database server:

metastore.storage.schema.reader.impl=org.apache.hadoop.hive.metastore.SerDeStorageSchemaReader​

Workaround
Set the following connection parameter "CatalogMode=query" in the connection URL to have the driver build (6.0.1.000139) to behave the same as the driver build (6.0.1.000081).
But the performance will be slower.
To get improved performance for getting this metadata, use the resolution given above.
Notes
Last Modified Date1/28/2020 11:01 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.