Troubleshooting
Problem
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'); |
Was this topic helpful?
Document Information
Modified date:
08 April 2021
UID
swg21667875