Return-Path: Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: (qmail 84850 invoked from network); 15 Apr 2010 16:51:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Apr 2010 16:51:21 -0000 Received: (qmail 23959 invoked by uid 500); 15 Apr 2010 16:51:20 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 23927 invoked by uid 500); 15 Apr 2010 16:51:19 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 23920 invoked by uid 500); 15 Apr 2010 16:51:19 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 23917 invoked by uid 99); 15 Apr 2010 16:51:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 16:51:19 +0000 X-ASF-Spam-Status: No, hits=-1356.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 16:51:18 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 2317816E36; Thu, 15 Apr 2010 16:50:58 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Thu, 15 Apr 2010 16:50:57 -0000 Message-ID: <20100415165057.18971.75403@eos.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22Hive/LanguageManual/DML=22_by_Ni?= =?utf-8?q?ng_Zhang?= Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for ch= ange notification. The "Hive/LanguageManual/DML" page has been changed by Ning Zhang. http://wiki.apache.org/hadoop/Hive/LanguageManual/DML?action=3Ddiff&rev1=3D= 14&rev2=3D15 -------------------------------------------------- FROM from_statement INSERT OVERWRITE TABLE tablename1 [PARTITION (partcol1=3Dval1, partcol2= =3Dval2 ...)] select_statement1 [INSERT OVERWRITE TABLE tablename2 [PARTITION ...] select_statement2] ... + = + Hive extension (dynamic partition inserts): + INSERT OVERWRITE TABLE tablename PARTITION (partcol1[=3Dval1], partcol2[= =3Dval2] ...) select_statement FROM from_statement = }}} = =3D=3D=3D=3D=3D Synopsis =3D=3D=3D=3D=3D @@ -60, +63 @@ * 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 t= able (or partition). Currently the OVERWRITE keyword is mandatory and impli= es that the contents of the chosen table or partition are replaced with the= output of corresponding select statement. * The output format and serialization class is determined by the table's= metadata (as specified via DDL commands on the table) + * In the dynamic partition inserts, users can give partial partition spe= cification, which means you just specify the list of partition column names= in the PARTITION clause. The column values are optional. If a partition co= lumn value is given, we call this static partition, otherwise dynamic parti= tion. Each dynamic partition column has a corresponding input column from t= he select statement. This means that the dynamic partition creation is dete= rmined by the value of the input column. = = =3D=3D=3D=3D=3D Notes =3D=3D=3D=3D=3D * Multi Table Inserts minimize the number of data scans required. Hive c= an insert data into multiple tables by scanning the input data just once (a= nd applying different query operators) to the input data.