On Oracle Big Data Applaince , Hive Select on Table with Large Schema Fails (Doc ID 2128208.1)

Last updated on OCTOBER 11, 2016

Applies to:

Big Data Appliance Integrated Software - Version 4.1.0 to 4.4.0 [Release 4.1 to 4.4]
Linux x86-64

Symptoms

On Oracle Big Data Appliance selecting from a Hive table with a large avsc file fails with error.

hive> select * from eligibility;
FAILED: SemanticException java.lang.IllegalArgumentException: Error: name expected at the position 50 of 'string:str


Originally create table statement failed which is resolved by increasing TYPE_NAME column size in COLUMNS_V2 table as stated in https://support.oracle.com/epmos/main/hadoop/Hive-Error-Add-request-failed-INSERT-INTO-COLUMNS-V2-when-creating-a-Table


CREATE external TABLE eligibility ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' STORED as INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' location '/user/oracle' TBLPROPERTIES ('avro.schema.url'='hdfs:///user/oracle/kelg.avsc');
...
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: Add request failed : INSERT INTO `COLUMNS_V2` (`CD_ID`,`COMMENT`,`COLUMN_NAME`,`TYPE_NAME`,`INTEGER_IDX`) VALUES (?,?,?,?,?)
...........
NestedThrowablesStackTrace:
java.sql.BatchUpdateException: Data truncation: Data too long for column 'TYPE_NAME' at row 1
.......
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'TYPE_NAME' at row 1

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms