You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "John (Qiang) Zhu" <zh...@gmail.com> on 2013/03/15 20:14:45 UTC
question about dynamic partition without overwrite partition
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