Support Questions
Find answers, ask questions, and share your expertise

Issue in insert overwrite from smaller table to larger one in Hive

Hello,
I am using the following table on which I intend to overwrite :

31397-bigger-table.png

This is the schema of the table I plan to write it from:

Following are the insert overwrite queries I tried but leads to error:

31401-smaller-table.png

31402-error-result.png

31400-error-result.png

As you notice, I just want to insert data in my bigger table only in 10 columns (with key being introduced as a UUID) and leave the others fields empty.

What could be the workaround to this problem using hive query?

thanks

31398-smaller-table.png

1 REPLY 1

Expert Contributor

key may be a reserved keyword - have you tried quoting it?

You also want to list the columns from source table explicitly so that you have the same number of projections in source query and target table