Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

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

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
Highlighted

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

Mentor

@Praveen Patel

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

Highlighted

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

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 .

Don't have an account?
Coming from Hortonworks? Activate your account here