Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Noob question on creating tables


Copy link to this message
-
Re: Noob question on creating tables
On Fri, Mar 29, 2013 at 12:19 PM, Mark <[EMAIL PROTECTED]> wrote:

> We have existing log data in directories in the format of YEAR/MONTH/DAY.
>
> - How can we create a table over this table without hive modifying and/or
> moving it?
>

create external table foo (...) partitioned by (year  int, month int, day
int);
...

- How can we tell Hive to partition this data so it knows about each day of
> logs?
>

alter table foo add partition(year = 2013, month = 3, day = 29) location
'/path/to/2013/03/29';
> - Does hive out of the box work with reading compressed files?
>

yes, if you're using a compression scheme supported by Hadoop.
>
> Thanks
--
*Dean Wampler, Ph.D.*
thinkbiganalytics.com
+1-312-339-1330