Bulkload to Impala fails with a "Character values inserted as SMALLINT must be integers. Disallowed value is: …" error


In SAS® 9.4M9 TS1M9, bulk load failures might occur when you load data into Impala with BULKLOAD=YES. The error is displayed during Insert operations into Impala tables that contain SMALLINT columns.

An error similar to the following is displayed when this issue occurs:

ERROR: Character values inserted as SMALLINT must be integers. Disallowed value is: ?.
WARNING: File deletion failed for libname.table-name.DATA.

A regression introduced in SAS 9.4M9 causes this issue. 

Workaround

To circumvent this issue, create an INTEGER data type instead of a SMALLINT. You can create an INTEGER data type by modifying the format of the column in the source table used to create the Impala table.

Here is an example: 

proc datasets library=sas-libref ; 
   modify table-name;
      format column-name 6. ;
run ; quit ; 

In this example, the column would have a format of 4, which results in a SMALLINT. A format of 6 would result in an INTEGER.