Hi Chen,

We don't directly support "Insert into" for now.

In our cluster, we set up tables to be "partitioned" and load/insert
overwrite one partition at a time. This will probably work for you as
well (assuming you are doing data warehouse)


If this does not, there is still a work-around:
INSERT OVERWRITE INTO TABLE myTable
  SELECT ... FROM ...
  UNION ALL
  SELECT * from myTable;

As you can imagine, this approach is not very efficiently. So we
recommend the "partitioned" approach if it fits to your requirements.

Zheng


On Tue, Jul 21, 2009 at 2:38 PM, Namit Jain<[email protected]> wrote:
> Currently, hive only supports overwriting the data – appending is not
> supported
>
>
>
>
>
> From: chen keven [mailto:[email protected]]
> Sent: Tuesday, July 21, 2009 2:34 PM
> To: [email protected]
> Subject: insert into not supported?
>
>
>
> I tried to use" insert into "  command to insert data in table. However,
> hive doesn't recognize it. It gives me error like mismatched input 'into'
> expecting overwrite in insert clause.
> "insert overwrite" simply overwrite the data in the table. But I need to
> concatenate the data. I did a quick search, I found some previous
> presentation talking about insert into. Did I do something wrong?
>
> --
> Thank you,
> Keven Chen



-- 
Yours,
Zheng

Reply via email to