My Oracle Support Banner

Inserting Data into Partitions Created Before Altering Hive Table Fails With SemanticException [Error 10044] (Doc ID 1640087.1)

Last updated on MARCH 28, 2014

Applies to:

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

Symptoms

Inserting data into a old partition which is created before altering the hive table by adding a new column to the table,  fails with the error like the following:

FAILED: SemanticException [Error 10044]: Line 1:23 Cannot insert into target table because column number/types are different '"35025"': Table insclause-0 has 25 columns, but query has 26 columns.


For example:

hive> ALTER TABLE ro_ptd ADD PARTITION (DEALER_NO="35025");
OK
Time taken: 0.339 seconds
hive> ALTER TABLE ro_ptd ADD COLUMNS (IDH_LOAD_TIME TIMESTAMP); 
OK
Time taken: 0.183 seconds
hive> INSERT OVERWRITE TABLE ro_ptd PARTITION(DEALER_NO="35025") 
  > SELECT
  > ORDER_NO,
    .....
  > OP_DESC5,
  > TIRE_SALE_INDICATOR,
  > REPAIR_DATE,
  > UNIX_TIMESTAMP(),
  > DEALER_NO from ro where dealer_no="35025";

FAILED: SemanticException [Error 10044]: Line 1:23 Cannot insert into target table because column number/types are different '"35025"': Table insclause-0 has 25 columns, but query has 26 columns.

 

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.