My Oracle Support Banner

Creating a Hive Table with Avro Schema Fails with "java.sql.BatchUpdateException: Data truncation: Data too long for column 'TYPE_NAME' at row 1" (Doc ID 2163481.1)

Last updated on JULY 21, 2016

Applies to:

Big Data Appliance Integrated Software - Version 4.4.0 and later
Linux x86-64

Symptoms

Creating a Hive table using an avro schema with logic like:

CREATE TABLE test-hive_table
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'
TBLPROPERTIES (
'avro.schema.url'='hdfs://*/avro/*/test-hive_table.avsc');

fails with:

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.SentryFilterDDLTask. MetaException(message:javax.jdo.JDODataStoreException: Add request failed : INSERT INTO `*****
[...]
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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.