Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77EF010BC9 for ; Mon, 17 Nov 2014 07:33:13 +0000 (UTC) Received: (qmail 97741 invoked by uid 500); 17 Nov 2014 07:33:04 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 97619 invoked by uid 500); 17 Nov 2014 07:33:04 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 97608 invoked by uid 99); 17 Nov 2014 07:33:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2014 07:33:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of unmeshabiju@gmail.com designates 209.85.213.182 as permitted sender) Received: from [209.85.213.182] (HELO mail-ig0-f182.google.com) (209.85.213.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2014 07:32:59 +0000 Received: by mail-ig0-f182.google.com with SMTP id hn15so1610015igb.15 for ; Sun, 16 Nov 2014 23:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Vgs4X9PfPzclGzVzd3Dgf/uC/E2GvaFJZAg0AyX21f0=; b=j8svFlclUt8i0d6MuHk7dS5dAUiX/smXN7qxsfMNByig3oYXW5i8AqiLGwRcQNbnze oanMAIljKHheV2qmLOXj3kOrtELePDAVUjFGC6o1IW2fNIOWSnQFQ3sEI4eyA3s5OG0+ 4iXVAcJ+Oofyi/FaMQy5YDD8QZ+L6gYJKNaGYDYHgWYYIcw1xCmp66Xayj1SOgRzoIbM UWWhAxEgQGL8FVn+Wr1+8klwa2eVPJK/oK+Uf8K2pjJ7MkiA3GEeelftUnF24+Hgb1rK EDOPAWmjQRkjKtlchAPTZudPba2GpT4BJs+FBb86lv9kJ9lECO3j8HPEmCifIADoAjKg sgcg== X-Received: by 10.42.144.196 with SMTP id c4mr26851467icv.0.1416209514449; Sun, 16 Nov 2014 23:31:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.134.130 with HTTP; Sun, 16 Nov 2014 23:31:14 -0800 (PST) In-Reply-To: References: From: unmesha sreeveni Date: Mon, 17 Nov 2014 13:01:14 +0530 Message-ID: Subject: Fwd: Values getting duplicated in Hive table(Partitioned) To: User Hadoop Content-Type: multipart/alternative; boundary=20cf305644230955ad050808f941 X-Virus-Checked: Checked by ClamAV on apache.org --20cf305644230955ad050808f941 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In non partitioned table I am getting the correct values. Is my update query wrong? INSERT OVERWRITE TABLE Unm_Parti_Trail PARTITION (Department =3D 'A') SELEC= T employeeid,firstname,designation, CASE WHEN employeeid=3D19 THEN '50000 ELS= E salary END AS salary FROM Unm_Parti_Trail; What I tried to include in the query is , In partion with department =3D A, update employeeid =3D19 's salary with 50000 Is that query statement wrong? and the replication is not affected to dept B and C ---------- Forwarded message ---------- From: hadoop hive Date: Mon, Nov 17, 2014 at 10:08 AM Subject: Re: Values getting duplicated in Hive table(Partitioned) To: user@hive.apache.org Can you check your select query to run on non partitioned tables. Check if it's giving correct values. Same as for dept. B On Nov 17, 2014 10:03 AM, "unmesha sreeveni" wrote= : > ***I created a Hive table with *non*- *partitioned* and using select > query I inserted data into *Partioned* Hive table. > > On Mon, Nov 17, 2014 at 10:00 AM, unmesha sreeveni > wrote: > >> I created a Hive table with *partition* and inserted data into Partioned >> Hive table. >> >> Refered site >> >> >> 1. >> >> *Initially created one Non -partioned table and then using select >> query and loaded data into partioned table. Is there an alternate way= ?* >> 2. >> >> *By following above link my partioned table contains duplicate >> values. Below are the setps* >> >> This is my Sample employee dataset:link1 >> >> I tried the following queries: link2 >> >> But after updating a value in Hive table,the values are getting >> duplicated. >> >> 7 Nirmal Tech 12000 A >> 7 Nirmal Tech 12000 B >> >> Nirmal is placed in Department *A* only >> =E2=80=8B,=E2=80=8B >> but it is duplicated to department *B*. >> >> And Once I update a column value in middle I am getting NULL values >> displayed,while updating last column it is fine. >> >> Am I doing any thing wrong. >> Please suggest.-- >> > > -- *Thanks & Regards * *Unmesha Sreeveni U.B* *Hadoop, Bigdata Developer* *Centre for Cyber Security | Amrita Vishwa Vidyapeetham* http://www.unmeshasreeveni.blogspot.in/ --20cf305644230955ad050808f941 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

In non partition= ed table I am getting the correct values.

Is my update query wrong?<= font color=3D"#000000" face=3D"Consolas, Menlo, Monaco, Lucida Console, Lib= eration Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif"= >

INSERT OVERWRITE TABLE Unm_Parti_Trail PARTITION (Departm= ent =3D 'A') SELECT employeeid,firstname,designation, CASE WHEN emp= loyeeid=3D19 THEN '50000 ELSE salary END AS salary FROM Unm_Parti_Trail= ;


What I tried to incl= ude in the query is , In partion with department =3D A, update employeeid = =3D19 's salary with 50000

Is that query statement wrong? and th= e replication is not affected to dept B and C


-------= --- Forwarded message ----------
From: had= oop hive <hadoophive@gmail.com>
Date: Mon, Nov 17,= 2014 at 10:08 AM
Subject: Re: Values getting duplicated in Hive table(P= artitioned)
To: user@hive.apache.org


Can you check your sel= ect query to run on non partitioned tables. Check if it's giving correc= t values.

Same as for dept. B

On Nov 17, 2014 10:03 AM, "unmesha sreeveni= " <unmes= habiju@gmail.com> wrote:
=
***I created a Hive table with non-=C2=A0partitioned=C2=A0an= d using select query I inserted data into Partioned Hive table.

On = Mon, Nov 17, 2014 at 10:00 AM, unmesha sreeveni <unmeshabiju@gmail.com= > wrote:

I created a Hive table with=C2=A0partition=C2=A0and insert= ed data into Partioned Hive table.

Refered site

  1. Initially created one Non -partioned table and then using sele= ct query and loaded data into partioned table. Is there an alternate way?

  2. By following above link my partion= ed table contains duplicate values. Below are the setps

  3. This is my Sample employee dataset:link1

    I tried the f= ollowing queries:=C2=A0link2

    But after updating a value= in Hive table,the values are getting duplicated.

    7       Nirmal  Tech    12000   A
    7       Nirmal  Tech    12000   B

Nirmal is placed in Depar= tment=C2=A0A= =C2=A0only

= =E2=80=8B,=E2=80=8B
but it is duplicated to department=C2=A0B.

And Once I upd= ate a column value in middle I am getting NULL values displayed,while updat= ing last column it is fine.

Am I doing any thing wrong.

Please suggest.--=C2=A0
<= div>
--
Thanks &= Regards

Unmesha Sreeveni U.B
Hadoop, Bigdata Developer
=
Centre for Cyber Security | Amrita Vishwa V= idyapeetham
=

--20cf305644230955ad050808f941--