HBase with respect to querying should be treated as a (augmented)
key/value store, so it doesn't support ad hoc queries.

The closest this translates to in HBase would be for you to scan your
table for all values between row key 20100200000000 and 201008312359
and then filter on the month, calculate if the returned row is a
friday, that time=1430, and that productinfo=abc. This can possibly
scan a lot of rows, taking a lot of time, and cannot be used for to
populate user-facing UIs.

You could also run it in 3 parallel scans, one for each month, then
filter the remaining and join (in your application) the results to
make it faster.

Good luck!

J-D

On Fri, Aug 27, 2010 at 2:34 PM, Shuja Rehman <[email protected]> wrote:
> Hi
>
> I am trying to implement equivalent of this query in Hbase
>
> *SELECT *value1, value2, value3 , (value1+value2) as calculatedValue
> *FROM *myTable
> *WHERE *year=2010 and month in (2,4,6) and day= 'Friday' and time='14:30'
>  and Product='Abc'
>
> The Hbase table has the row key with *YYYYMMDDHHMMSS *e.g *20100809023000 *and
> Product information is in *ProductInfo *column family.
>
> Can anybody help me how to proceed with this scenario?
>
> Thanks in advance
>
> --
> Regards
> Shuja-ur-Rehman Baig
> http://pk.linkedin.com/in/shujamughal
> Cell: +92 3214207445
>

Reply via email to