hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sriram Krishnan <skrish...@netflix.com>
Subject Re: move tables into different database
Date Tue, 31 Jan 2012 01:48:57 GMT
You could do that if you don't mind moving the data (which may be expensive depending on how
much data you have). Also if your table is partitioned, you may have to do another additional
step (to recover partitions).

Sriram

From: Aniket Mokashi <aniket486@gmail.com<mailto:aniket486@gmail.com>>
Reply-To: <user@hive.apache.org<mailto:user@hive.apache.org>>
Date: Mon, 30 Jan 2012 16:32:03 -0800
To: <user@hive.apache.org<mailto:user@hive.apache.org>>
Subject: Re: move tables into different database

If you are on hdfs

How about--

use db1;
create table table1 like db2.table1;

and move the data?

Thanks,
Aniket

On Mon, Jan 30, 2012 at 8:09 AM, Sriram Krishnan <skrishnan@netflix.com<mailto:skrishnan@netflix.com>>
wrote:
AFAIK there is no way in HiveQL to do this. We had a similar requirement in the past, and
we wrote a shell script to update the MySQL metastore directly (obviously not the cleanest
or recommended way to go).

Cheers,
Sriram

From: hadoop hive <hadoophive@gmail.com<mailto:hadoophive@gmail.com>>
Reply-To: <user@hive.apache.org<mailto:user@hive.apache.org>>
Date: Mon, 30 Jan 2012 20:05:13 +0530
To: <user@hive.apache.org<mailto:user@hive.apache.org>>
Subject: move tables into different database

Hey folks,

Is this possible to moves table into different hive database??

regards
Vikas Srivastava





--
"...:::Aniket:::... Quetzalco@tl"

Mime
View raw message