Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> move tables into different database


+
hadoop hive 2012-01-30, 14:35
+
Sriram Krishnan 2012-01-30, 16:09
+
Aniket Mokashi 2012-01-31, 00:32
+
Sriram Krishnan 2012-01-31, 01:48
Copy link to this message
-
Re: move tables into different database
Someone recently posted a command to convert a managed table to an external table. If you also use that command, there's no expensive copy operation.

You'd probably want to move the data into a different HDFS directory though, to keep your namespace as consistent as possible,

Matt

On Jan 30, 2012, at 8:48 PM, Sriram Krishnan <[EMAIL PROTECTED]> wrote:

> 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 <[EMAIL PROTECTED]>
> Reply-To: <[EMAIL PROTECTED]>
> Date: Mon, 30 Jan 2012 16:32:03 -0800
> To: <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> Reply-To: <[EMAIL PROTECTED]>
> Date: Mon, 30 Jan 2012 20:05:13 +0530
> To: <[EMAIL PROTECTED]>
> Subject: move tables into different database
>
> Hey folks,
>
> Is this possible to moves table into different hive database??
>
> regards
> Vikas Srivastava
>
>
>
>
>
> --
> "...:::Aniket:::... Quetzalco@tl"
+
hadoop hive 2012-01-31, 05:49
+
Sriram Krishnan 2012-01-31, 06:47
+
hadoop hive 2012-01-31, 07:00
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB