Here is the default textfile.  Substitute delimiters as necessary.

CREATE TABLE ...
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001' COLLECTION ITEMS TERMINATED BY '\002' MAP KEYS 
TERMINATED BY '\003'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;

 
On May 11, 2012, at 5:58 PM, Igor Tatarinov wrote:

> Is that possible?
> 
> What I am trying to do is create an S3 table using CTAS. Since CTAS doesn't 
> allow specifying a location, I have to create a managed table first:
> 
> CREATE TABLE T AS
> SELECT ...;
> 
> (I don't want to fix T's schema because the list of selected expressions is 
> dynamically generated and can change.)
> 
> Then, I want to create an s3 table like T:
> 
> CREATE EXTERNAL TABLE S LIKE S
> LOCATION ...;
> 
> Unfortunately, I can't specify a different delimiter there ('\t' instead of 
> the default one).  Is there another way to do that before INSERTing into the 
> S3 table?
> 
> Thanks!
> igor
> decide.com
> 

Reply via email to