hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E. Sammer" <>
Subject Create table as select
Date Sat, 13 Feb 2010 00:41:03 GMT
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;
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

View raw message