Skip to main content
HareshAmin
Silver ⭐️
November 11, 2021
Solved

Impala Not supporting org.apache.hadoop.hive.serde2.OpenCSVSerde SerDe class

Impala is not supporting org.apache.hadoop.hive.serde2.OpenCSVSerde SerDe class. Please suggest the solution.

 

Table aggregate_test is created using Hive and org.apache.hadoop.hive.serde2.OpenCSVSerde SerDe class.

 

Following query is not working:

SELECT * from open_aggregate_test.aggregate_test ;

 

Above query gives following error:

SQL Error [500051] [HY000]: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Failed to load metadata for table: 'open_aggregate_test.aggregate_test'
CAUSED BY: TableLoadingException: Could not load table open_aggregate_test.aggregate_test from catalog
CAUSED BY: TException: TGetPartialCatalogObjectResponse(status:TStatus(status_code:GENERAL, error_msgs:[TableLoadingException: Failed to load metadata for table: open_aggregate_test.aggregate_test
CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hadoop.hive.serde2.OpenCSVSerde' is not supported.]), lookup_status:OK)
), Query: SELECT * from open_aggregate_test.aggregate_test.

smruti
smrutiAnswer
Gold ⭐️⭐️⭐️
November 14, 2021

@HareshAmin As you correctly said, Impala does not support the mentioned OpenCSVSerde serde.

So, you could recreate the table using CTAS, with a storage format that is supported by both Hive and Impala.

 

CREATE TABLE new_table
STORED AS PARQUET
AS
SELECT * FROM aggregate_test;

 

3 replies

smruti
Gold ⭐️⭐️⭐️
smrutiAnswer
Gold ⭐️⭐️⭐️
November 14, 2021

@HareshAmin As you correctly said, Impala does not support the mentioned OpenCSVSerde serde.

So, you could recreate the table using CTAS, with a storage format that is supported by both Hive and Impala.

 

CREATE TABLE new_table
STORED AS PARQUET
AS
SELECT * FROM aggregate_test;

 

Translate
HareshAmin
Silver ⭐️
November 16, 2021

Thanks @smruti for your reply. I will check this option.

Translate
VidyaSargur
Community Manager
Community Manager
November 18, 2021

@HareshAmin, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

Translate
Regards, Vidya Sargur, Community Manager Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.