I would like to perform a rows
query with Happybase for some known row keys and add a value filter so that only rows matching the filter are returned.
In HBase shell you can supply a filter to a get command, like so:
get 'meta', 'someuser', {FILTER => "SingleColumnValueFilter ('cf','gender',=,'regexstring:^male$')"}
In Happybase you can add a filter to a scan
command but I don't see the option on a rows
query. Here is how it works for scan
:
rows = tab.scan(filter="SingleColumnValueFilter('cf','gender',=,'regexstring:^male$')")
Is there a way to perform a filtered rows
query (for potentially random ordered row keys) using Happybase (or any other Python HBase client library)?
I imagined it would look like this (but there is no filter argument):
rows = tab.rows(rows=['h_key', 'a_key', 'z_key'], filter="SingleColumnValueFilter('cf','gender',=,'regexstring:^male$')")