IBM Support

Cannot load into a Hive table that is created in IBM InfoSphere BigInsights Big SQL when Oracle is used as the metastore

Technote (troubleshooting)


Problem(Abstract)

When Oracle is configured as the Hive metastore for IBM Big SQL, and you create a Hive table in Big SQL, the LOAD operation fails with an exception, 'Table not found'.

Symptom

Loading a table fails with the exception, "Table not found", as described in the following example:

LOAD HIVE DATA INPATH '/tmp/test.dat' OVERWRITE INTO TABLE test;
BIGSQL-GEN-0010 Found an internal error: 'Failed to execute query 'LOAD HIVE DATA INPATH '/tmp/test.dat' OVERWRITE INTO TABLE test' : java.lang.RuntimeException: load failed due to an error ocurring in hive: FAILED: Error in semantic analysis: Line 1:70 Table not found 'test'


Cause

The failure happens because the table property, serialization.null.format, is set to nothing, as in the following example:

serialization.null.format=

The root cause of the problem is that Oracle returns NULL for a column that contains a value of an empty string.


Resolving the problem

If Big SQL has an Oracle metastore configuration, you need to create the table by explicitly setting the serialization property in the CREATE TABLE DDL, as in the following example:

CREATE TABLE test(col1 INT) TBLPROPERTIES ('serialization.null.format' = 'NULL');

Document information

More support for: IBM BigInsights
Big SQL

Software version: 2.1.0, 2.1.1, 2.1.2

Operating system(s): Linux

Software edition: Enterprise Edition

Reference #: 1667875

Modified date: 27 March 2014