hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devopam Mittra <devo...@gmail.com>
Subject Re: Updating hive metadata
Date Fri, 19 Jun 2015 04:11:42 GMT
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*’s location
>
> hdfs dfs –cp /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-mail
> 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.
>



-- 
Devopam Mittra
Life and Relations are not binary

Mime
View raw message