Insertion Failed : Cannot insert into target table because column number/types are different

lakrouf_1
Level 1
Insertion Failed : Cannot insert into target table because column number/types are different
Hi,

I get this message from a hive recipe:

Cannot insert into target table because column number/types are different 'table_xxx': Table insclause-0 has 43 columns, but query has 44 columns.

I have two input tables in stacked dataset and created output table namually :

CREATE EXTERNAL TABLE schema (table_xx)
CLUSTERED BY ( key )
INTO 10 BUCKETS STORED AS ORC
location folder;

Could somebody help me?

thanks in advance.
0 Kudos
1 Reply
Clรฉment_Stenac
Hi,

What is the kind of query that you are doing ? If your data is partitioned, beware that "SELECT *" will return the partitioning column, but you can't have the partitioning column in the output (i.e. in Hive you can't do INSERT OVERWRITE t2 SELECT * FROM t1" if t1 is partitioned, you need to use explicit column names)
0 Kudos

Labels

?
Labels (2)
A banner prompting to get Dataiku