Insert into doesnt work in Hive – by passing it !

August 1, 2013

The insert into command doesnt work in hive and gives the error “mismatched input ‘INTO’ expecting OVERWRITE in insert clause”.

Hence, we have to look at the other methods for implementing the same.
Hive tables are set up to be partitioned and load/insert overwrite partitions at a time.

There is another inefficient method of doing this :

INSERT OVERWRITE INTO TABLE myTable
SELECT … FROM …
UNION ALL
SELECT * from myTable;

Advertisements