hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ning Zhang <nzh...@facebook.com>
Subject Re: Create table as select
Date Sat, 13 Feb 2010 00:57:33 GMT
I guess what Namit meant is CTAS is NOT supported in release 0.4, but only in 0.5 or trunk.

Ning

On Feb 12, 2010, at 4:43 PM, Namit Jain wrote:

> Create table as select in supported in Hive 0.4 release. It is a new feature in 0.5
> 
> -----Original Message-----
> From: E. Sammer [mailto:eric@lifeless.net] 
> Sent: Friday, February 12, 2010 4:41 PM
> To: hive-user@hadoop.apache.org
> Subject: Create table as select
> 
> The Hive wiki states the following for the CREATE TABLE ... DDL:
> 
> "AS select_statement]  (Note: this feature is only available on the 
> latest trunk or versions higher than 0.4.0.)"
> 
> I'm testing this syntax on 0.4.0(+14 - Cloudera distro) and I'm getting 
> errors from the query parser at the second occurrence of 'as' for the 
> select portion.
> 
> hive> describe raw_facts;
> OK
> year    int
> month   int
> day     int
> ... other fields...
> Time taken: 0.339 seconds
> 
> hive> create table foo row format delimited fields terminated by '\t' 
> stored as textfile as select year, month from raw_facts limit 20 ;
> FAILED: Parse Error: line 1:83 mismatched input 'as' expecting EOF
> 
> I've tried other variations such as without the stored as clause and all 
> uppercase but receive the same error. Is this incorrect usage on my part 
> or is the CTAS syntax versions higher than 0.4.0, exclusive?
> 
> Thanks in advance.
> -- 
> Eric Sammer
> eric@lifeless.net
> http://esammer.blogspot.com


Mime
View raw message