Support Questions

Find answers, ask questions, and share your expertise

insert overwrite table A select * from B; under Hive The sequence is causing the failure.

avatar

When i run insert overwrite from B to table A having all column present but not in the same sequence , i am getting a conversion error. IS there a solution available where we can force the insert by name of column insted of sequence.

2 REPLIES 2

avatar
Master Mentor

@Praveen Patel

Look at this @Sonu Sahi response in HCC https://community.hortonworks.com/answers/105850/view.html that could be a solution

avatar

Hi Geoffrey , Thanks for the suggestion . I am using ORC format for both table. it is only the sequence of the column that is causing the issue .

EG:

A(name string,sal decimal(3,2),DOB timestamp)

B(name String , DOB Date, sal decimal(3,2))

When i insert data from B to A using a select query i am getting this error.

if i drop table A and create it in the same sequence as of B it works fine.

Is there a solution which can be applied here to force hive to insert data based on name of column instead their Sequence .