Have you tried the following ?
scan 'cars', { COLUMNS => ['exterior', 'interior'], LIMIT => 10,
FILTER =>
"(ColumnPrefixFilter('sunroof')" }
ColumnPrefixFilter filters on KeyValue's. So as long as there is no
intersection between exterior and interior, it should work.
Cheers
On Thu, Jul 2, 2015 at 10:10 AM, aloharich <[email protected]> wrote:
> i'm still designing and coming up to speed with hbase, trying to use a
> columnprefix filter to find rows/keys that have a certain family:column
> key,
> and then get all the data for that key.
>
> so the goal would be, assuming there was a table like this (example)
>
> > create 'cars' , 'interior', 'exterior'
>
> Then assuming there was a bunch of rows with cars with a key by license
> plate (i know, this example is contrived and silly), and I wanted to find
> all keys/rows (and their data) that have a exterior:sunroof key, and then
> all of their rows of data (still coming up to speed on the terminology
> here,
> so welcome suggestion on what I've gotten wrong ;-)
>
> 12345 column=interior:radio value=foo
> 12345 column=interior:seat value=bar
> 12345 column=exterior:sunroof value=foo
> 22345 column=exterior:wheels value=two
> 22345 column=interior:radio value=bar
>
> scan 'cars', { COLUMNS => ['exterior'], LIMIT => 10, FILTER =>
> "(ColumnPrefixFilter('sunroof')" }
>
> Now that scan works and finds just the 12345 key, but i'd also like to get
> all the other data about the key in a single scan. Currently I have to get
> the rows/keys, then another scan for each to find all their associated
> data.
>
> Wondering if there is one way, in such a scenerio to get all the data,
> based
> on a column:key existing in a row?
>
> Thanks,
>
> Rich
>
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/scan-with-ColumnPrefixFilter-but-return-all-columns-that-match-tp4072862.html
> Sent from the HBase User mailing list archive at Nabble.com.
>