Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 940EE18C4F for ; Fri, 19 Jun 2015 04:11:53 +0000 (UTC) Received: (qmail 94867 invoked by uid 500); 19 Jun 2015 04:11:51 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 94797 invoked by uid 500); 19 Jun 2015 04:11:51 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 94787 invoked by uid 99); 19 Jun 2015 04:11:51 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 04:11:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D079C1A5CCF for ; Fri, 19 Jun 2015 04:11:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 1gBsFmZwu4Zz for ; Fri, 19 Jun 2015 04:11:44 +0000 (UTC) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id DD6EB249EA for ; Fri, 19 Jun 2015 04:11:43 +0000 (UTC) Received: by laka10 with SMTP id a10so66673494lak.0 for ; Thu, 18 Jun 2015 21:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wEmdv7WQjB96xTNVNM3y9RJVWcB9hwT1KPJYlmBNrgo=; b=QoFSUSVMOVKmcHxrPLnSIaCdbJ4nn1XSi4WuJPydr6/NRdiQT2k6DLmnYjlVJ33Wdl W4CgbXA1Cozky3cKNL686ekWrq7yY2hCfa7EDvULDenvYVMlZJqz1IM4+0lfQrL9AMws l2Sid85l1jG70mNi54BRqDwRrAXZJ6tRtzxCa4L/oC1pWjpCBiwAEMOCvWOQ4lvoiKEq v5mRQZAfzS40daojj3zHgolawTVVowE8wTnBMpqIZ5nGGTm1hq3VChAmNdNulIZCeDGX IahPLFc+C2wJY9yknj2NQ3qMs9tWtTmCaWRNAZoFaatMxNSfKsTqxO2l+dYQgNAStJpE ySKw== MIME-Version: 1.0 X-Received: by 10.153.7.104 with SMTP id db8mr10126484lad.124.1434687102421; Thu, 18 Jun 2015 21:11:42 -0700 (PDT) Received: by 10.112.158.195 with HTTP; Thu, 18 Jun 2015 21:11:42 -0700 (PDT) In-Reply-To: <3CE310CECADB9F46B5245852738136964355DB6F@PC1WEPSIEXDAG03> References: <3CE310CECADB9F46B5245852738136964355DB6F@PC1WEPSIEXDAG03> Date: Fri, 19 Jun 2015 09:41:42 +0530 Message-ID: Subject: Re: Updating hive metadata From: Devopam Mittra To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary=001a1134c8a01a92fe0518d71f67 --001a1134c8a01a92fe0518d71f67 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hi Prasanth, I would not suggest tweaking hive metastore info unless you have full knowledge of the entire tables that will get impacted due to such a change. And such things break a lot with upgrades since this is quite unmanageable manually. Why don't you create my_managed_table_2 as type EXTERNAL and link it to the copied data in hdfs layer .. regards Dev On Thu, Jun 18, 2015 at 11:40 PM, Chagarlamudi, Prasanth < prasanth.chagarlamudi@epsilon.com> wrote: > Hello, > > Is there a way to update metadata in hive? > > > > Created database *mydb*; > > Created *my_point_table*; > > Created *my_managed_table*; > > Insert into *my_managed_table* from *my_point_table*; > > > > Now, > > Create *my_point_table_2*; > > //Copy data from hive* managed_table *to* managed_table_2*=E2=80=99s loca= tion > > hdfs dfs =E2=80=93cp /user/hive/warehouse/mydb.db/*my_managed_table* > /user/hive/warehouse/mydb.db/*my_managed_table_2* > > At this point, I am expecting the following query > > Select * from *my_managed_table_2*; to give me all the data I > just copied from *my_managed_table*; > > > > How do I update the hive metastore to consider the data that I copied to > *my_managed_table_2*? Is that even possible? > > > > Thanks in advance > > Prasanth Chagarlamudi > > > > > > ------------------------------ > > This e-mail and files transmitted with it are confidential, and are > intended solely for the use of the individual or entity to whom this e-ma= il > is addressed. If you are not the intended recipient, or the employee or > agent responsible to deliver it to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you are not one of the named > recipient(s) or otherwise have reason to believe that you received this > message in error, please immediately notify sender by e-mail, and destroy > the original message. Thank You. > --=20 Devopam Mittra Life and Relations are not binary --001a1134c8a01a92fe0518d71f67 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hi Prasanth,
I would not suggest tweaking hive metasto= re info unless you have full knowledge of the entire tables that will get i= mpacted due to such a change. And such things break a lot with upgrades sin= ce this is quite unmanageable manually.

Why don= 9;t you create my_managed_table_2 as type EXTERNAL and link it to the copie= d data in hdfs layer ..

regards
Dev

On Thu, Ju= n 18, 2015 at 11:40 PM, Chagarlamudi, Prasanth <prasanth.c= hagarlamudi@epsilon.com> wrote:

Hello,

Is there a way to update metadata in hive?

=C2=A0

Created database mydb;

Created my_point_table<= /span>;

Created my_managed_tabl= e;

Insert into my_managed_= table from my_point_table;

=C2=A0

Now,

Create my_point_table_2= ;

//Copy data from hive m= anaged_table to managed_table_2=E2=80=99s= location

hdfs dfs =E2=80=93cp /user/hive/warehouse/mydb.db/my_managed= _table /user/hive/warehouse/mydb= .db/my_managed_table_2

At this point, I am = expecting the following query

=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Select * from my_managed_table_2; to give me all the data I just copied from my_managed_table;

=C2=A0=

How do I update the = hive metastore to consider the data that I copied to my_managed_table_2? Is that even possible?

=C2=A0=

Thanks in advance=

Prasanth Chagarlamud= i

=C2=A0

=C2=A0




This e-mail and files transmitted with it are confidential, and are intende= d solely for the use of the individual or entity to whom this e-mail is add= ressed. If you are not the intended recipient, or the employee or agent res= ponsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or= copying of this communication is strictly prohibited. If you are not one o= f the named recipient(s) or otherwise have reason to believe that you recei= ved this message in error, please immediately notify sender by e-mail, and destroy the original message. Tha= nk You.



--
Devopam Mittra
Life and Relations are not binary
--001a1134c8a01a92fe0518d71f67--