A partitioned table has a set of partition keys. Check wiki on how to create 
partitioned table. In your case you can one partition key named 'ds' 
(datestamp). You can choose any format for values but commonly chosen one is 
'YYYY-MM-DD'. You can specify the partition while loading data by '<TBL_NAME> 
PARTITION (ds="YYYY-MM-DD")' and hive will load the data into hdfs directory 
located at <table_directory>/ds=YYYY-MM-DD/.

But if you want to specify the full path, append 'LOCATION <you own location>' 
to the above.

Thanks,
Prasad


________________________________
From: Mayuran Yogarajah <[email protected]>
Reply-To: <[email protected]>
Date: Fri, 11 Sep 2009 13:16:27 -0700
To: <[email protected]>
Subject: Re: General design/schema question

Prasad Chakka wrote:
> You should create a daily partition table. So you just need to create
> a new partition which is automatic if you use 'LOAD DATA... INTO TABLE
> ... PARTITION (ds='2009-09-01')'
>
> Prasad
>
Just wanted to clarify, I still need to do LOAD DATA .. INTO TABLE ..
PARTITION (day='hdfs/path/to/day')
every night correct? I was confused since you said its automatic.  This
is actually great if it can work like this!

thanks again

Reply via email to