Pasting an example here:

CREATE EXTERNAL TABLE IF NOT EXISTS tablename (.......) partitioned by
(insertdate string) ROW FORMAT SERDE
'org.apache.hadoop.hive.contrib.serde2.JsonSerde';

alter table tablename add partition (insertdate='2008-01-01') LOCATION
's3n://' or 'hdfs://<path>/abc/xyz/'

- Prashanth



On Fri, Jul 1, 2011 at 3:57 PM, Aniket Mokashi <aniket...@gmail.com> wrote:

> Hi,
>
> I have a data on HDFS that is already stored into directories as per date.
> for example- /abc/xyz/yyyy-mm-d1, /abc/xyz/yyyy-mm-d2. How do I create
> external table with partition key as date to point to data in this
> directory?
> Please advise.
>
> Thanks,
> Aniket
>
>


-- 
- Prash

Reply via email to