hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avram Aelony <AvramAel...@eharmony.com>
Subject Re: External table creation question
Date Tue, 12 Apr 2011 16:50:59 GMT

Hi Prash,

Try this:

create external table mslog 
(  
   time_stamp string,
   seq string
) row format delimited fields terminated by '\t' stored as textfile location 's3://your/bucket/path/'
;

Important: your s3 bucket can only contain files that have the same schema format. Hive doesn't
like it when the bucket contains files with a mixture of different columns.
Also, check your logs if you don't think your data was successfully read.

Hope this helps,
~Avram


On Apr 11, 2011, at 2:09 PM, Prashanth R wrote:

> Hi,
> 
> The Hive documentation describes keyword "external" as following:
> 
> The EXTERNAL keyword lets you create a table and provide a LOCATION so that Hive does
not use a default location for this table. This comes in handy if you already have data generated.
> 
> I have my data available in a directory in a bucket in s3. I am trying to create a table
like 
> 
> CREATE EXTERNAL TABLE IF NOT EXISTS mslog ( TIME_STAMP STRING, SEQ STRING) LOCATION 's3://
<bucket name>/processed/'
> 
> But the table isnt' populated with the data available at the s3 location. Am i missing
something here?
> 
> 
> -- 
> - Prash


Mime
View raw message