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

lakrouf_1
lakrouf_1 Dataiku DSS Core Designer, Registered Posts: 2 ✭✭✭✭
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.
Tagged:

Answers

  • Clément_Stenac
    Clément_Stenac Dataiker, Dataiku DSS Core Designer, Registered Posts: 753 Dataiker
    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)
Setup Info
    Tags
      Help me…