in [mailto:nj...@fb.com]
Sent: Wednesday, February 09, 2011 8:24 AM
To: user@hive.apache.org
Subject: Re: for each partition
You can use dynamic partitioning:
insert overwrite table item_view_aggregate partition
(date_hour) select iv.sid, count(*), date_hour from item_view iv where
(iv.date_hour=
You can use dynamic partitioning:
insert overwrite table item_view_aggregate partition
(date_hour) select iv.sid, count(*), date_hour from item_view iv where
(iv.date_hour='2011310116' or date_hour=''' or date_hour='.)
group by iv.sid, date_hour;
On 2/9/11 5:49 AM, "Cam Bazz" wrote:
>We
Well, I designed my dataflow to work incrementally based on
partitions. But I have a number of datafiles now,
and for the first run, I have to for example:
insert overwrite table item_view_aggregate partition
(date_hour=2011310116) select iv.sid, count(*) from item_view iv where
iv.date_hour='2011
If you want to operate over all partitions in a table you don't need to specify
the partitions at all. Run your query and enjoy!
If you want to specify the partition mapping of the output dataset from a
query, I think you can derive that value on a per row basis like so:
Partition=substr(dat