RE: S3/EMR Hive: Load contents of a single file

2013-03-27 Thread Tony Burton
No problem Keith - it was a worthwhile exercise for me to go back and double check everything was working as expected. -Original Message- From: Keith Wiley [mailto:kwi...@keithwiley.com] Sent: 27 March 2013 17:03 To: user@hive.apache.org Subject: Re: S3/EMR Hive: Load contents of a

Re: S3/EMR Hive: Load contents of a single file

2013-03-27 Thread Keith Wiley
Okay, I also saw your previous response which analyzed queries into two tables built around two files in the same directory. I guess I was simply wrong in my understanding that a Hive table is fundamentally associated with a directory instead of a file. Turns out, it be can either one. A dire

RE: S3/EMR Hive: Load contents of a single file

2013-03-27 Thread Tony Burton
singly) "location:s3://mybucket/path/to/data/" From: Tony Burton [mailto:tbur...@sportingindex.com] Sent: 27 March 2013 08:46 To: 'user@hive.apache.org' Subject: RE: S3/EMR Hive: Load contents of a single file Thanks for the reply Keith. > you could have dispensed with the addi

RE: S3/EMR Hive: Load contents of a single file

2013-03-27 Thread Tony Burton
iles in s3. Maybe other readers could try a similar exercise and present their results? Are there other tests I could try to further verify my findings? Tony -Original Message- From: Keith Wiley [mailto:kwi...@keithwiley.com] Sent: 26 March 2013 19:40 To: user@hive.apache.org Subject:

Re: S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Keith Wiley
LOCATION is a directory. Cool! > > Tony > > > > > > > > From: Sanjay Subramanian [mailto:sanjay.subraman...@wizecommerce.com] > Sent: 26 March 2013 17:22 > To: user@hive.apache.org > Subject: Re: S3/EMR Hive: Load contents of a single file >

Re: S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Sanjay Subramanian
e.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Subject: RE: S3/EMR Hive: Load contents of a single file Thanks for the quick reply Sanjay. ALTER TABLE is the key, but slightly different to your suggestion. I create the table as before, but don’t specify location: $ crea

Re: S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Ramki Palle
First of all, you cannot point a table to a file. Each table will have a corresponding table. If you want to have all the in the table contains in only one file, simply copy that one file into the directory. The table does not need to know the name of the file. It only matters whether the structure

RE: S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Tony Burton
Sent: 26 March 2013 17:22 To: user@hive.apache.org Subject: Re: S3/EMR Hive: Load contents of a single file Hi Tony Can u create the table without any location. After that you could do an ALTER TABLE add location and partition ALTER TABLE myData ADD PARTITION (partitionColumn1='$value1&

Re: S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Sanjay Subramanian
From: Tony Burton mailto:tbur...@sportingindex.com>> Reply-To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Date: Tuesday, March 26, 2013 10:11 AM To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apa

S3/EMR Hive: Load contents of a single file

2013-03-26 Thread Tony Burton
Hi list, I've been using hive to perform queries on data hosted on AWS S3, and my tables point at data by specifying the directory in which the data is stored, eg $ create external table myData (str1 string, str2 string, count1 int) partitioned by row format stored as textfile location 's3:/