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 Threaded View
Hive >> mail # user >> create table LIKE for external tables?


Copy link to this message
-
Re: create table LIKE for external tables?
1. create external table B like A;
2. alter table B set location 's3n://....'

Thanks,
Aniket

On Mon, Mar 5, 2012 at 4:59 PM, Igor Tatarinov <[EMAIL PROTECTED]> wrote:

> Is there a way to create an external table LIKE another table?
>
> This doesn't work:
>
> CREATE TABLE B LIKE A
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE
> LOCATION 's3://..';
>
> FAILED: Parse Error: line 2:0 mismatched input 'ROW' expecting EOF
>
> I tried creating a managed table B first and then changing its properties.
> I can "make" the table external but I don't know how to change its
> "location" from hdfs to s3.
>
> I am using EMR Hive.
>
> Thanks!
>
> igor
> decide.com
>
>
--
"...:::Aniket:::... Quetzalco@tl"
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