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

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


+
Mark 2013-03-29, 17:19
+
Sanjay Subramanian 2013-03-29, 17:40
+
Mark 2013-03-29, 18:16
+
Dean Wampler 2013-03-29, 18:37
+
Sanjay Subramanian 2013-03-29, 19:45
+
Mark 2013-03-29, 20:25
+
Sanjay Subramanian 2013-03-29, 20:38
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
+
Mark 2013-03-29, 18:16
+
Nitin Pawar 2013-03-29, 18:36