hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher, Pat" <patrick.christop...@hp.com>
Subject Re: for each partition
Date Wed, 09 Feb 2011 05:33:33 GMT
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(dateval,1,14)

Assuming dateval is a field in your table and partition is your partition field.

Lemme know if you need more or if it doesn't work.  I'll check it out tomorrow at work.

Pat



-- Sent from my Palm Pre

________________________________
On Feb 8, 2011 8:57 PM, Cam Bazz <cambazz@gmail.com> wrote:

Hello,

How can I do some process for each partition in some other table.

for example lets say table A has partitions 1,2,3

I want to be able to say

for each partition in A do {
select * from A where partition is ? into some othertable where partition is ?
}

Best Regards,
C.B.

Mime
View raw message