hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John (Qiang) Zhu" <zhuq2...@gmail.com>
Subject question about dynamic partition without overwrite partition
Date Fri, 15 Mar 2013 19:14:45 GMT
my hive version is 0.9 installed along with cloudera 4.1.

i use "insert into" + "dynamic partition" in my use case but i found the
partition is still overwritten after multiple inserting. I also found some
explains from hive manual:


   - INSERT OVERWRITE will overwrite any existing data in the table or
   partition unless IF NOT EXISTS is provided for a partition (as of Hive
   0.9.0 <https://issues.apache.org/jira/browse/HIVE-2612>)
   - INSERT INTO will append to the table or partition keeping the existing
   data in tact. (Note: INSERT INTO syntax is only available starting in
   version 0.8)


   - Inserts can be done to a table or a partition. If the table is
   partitioned, then one must specify a specific partition of the table by
   specifying values for all of the partitioning columns.
   - Multiple insert clauses (also known as *Multi Table Insert*) can be
   specified in the same query
   - The output of each of the select statements is written to the chosen
   table (or partition).* Currently the OVERWRITE keyword is mandatory and
   implies that the contents of the chosen table or partition are replaced
   with the output of corresponding select statement.*

that is quite confusing and I just suspects if the "INSERT INTO" still
overwrites the partition along with the dynamic partition?

Took me a long day to figure out the solution and hope someone experienced
the same issue, give me some lights ...

thanks a lot,
John

Mime
View raw message