You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Rajeshkumar J <ra...@gmail.com> on 2015/12/31 06:57:38 UTC
regular expression in range scan
Hi,
Currently i am using range scan for querying data in my hbase table. Is
there any option available to use regular expression in range scan. For ex
this is my range scan query
scan 'tmp', {STARTROW => '539428', ENDROW => '539430'}
Is there any option available so that we can use
scan 'tmp', {STARTROW => '5394.*', ENDROW => '539430'}
Thanks
Re: regular expression in range scan
Posted by Ted Yu <yu...@gmail.com>.
Can user select date range using the first combo box ?
If not, you can generate the combinations from combo box selections and issue multi-get to fetch the data.
Cheers
> On Dec 31, 2015, at 2:36 AM, Rajeshkumar J <ra...@gmail.com> wrote:
>
> Hi Ted,
>
> This is my usecase we have 3 combo boxes to choose date and platform and
> control. Based on the options chosen we are retrieving data from hbase. We
> have designed our row key as date|platform|control. So if the user chooses
> single value for each combo box (date : 2015-12-12, platform : bigdata,
> control : bigdata and this will be concatenated as
> 2015-12-12|bigdata|bigdata and passed to hbase) it works and retrieves
> data. But if the user chooses multiple options for either platform or
> control it will fail. So help me in resolving this problem?
>
> Thanks
>
>> On Thu, Dec 31, 2015 at 11:43 AM, Ted Yu <yu...@gmail.com> wrote:
>>
>> For the example given below, you can specify PrefixFilter for the scan.
>>
>> Please see also for examples of filter involving regex:
>> https://issues.apache.org/jira/browse/HBASE-9428
>>
>>>> On Dec 30, 2015, at 9:57 PM, Rajeshkumar J <ra...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> Currently i am using range scan for querying data in my hbase table. Is
>>> there any option available to use regular expression in range scan. For
>> ex
>>> this is my range scan query
>>>
>>> scan 'tmp', {STARTROW => '539428', ENDROW => '539430'}
>>>
>>> Is there any option available so that we can use
>>>
>>>
>>> scan 'tmp', {STARTROW => '5394.*', ENDROW => '539430'}
>>>
>>> Thanks
>>
Re: regular expression in range scan
Posted by Rajeshkumar J <ra...@gmail.com>.
Hi Ted,
This is my usecase we have 3 combo boxes to choose date and platform and
control. Based on the options chosen we are retrieving data from hbase. We
have designed our row key as date|platform|control. So if the user chooses
single value for each combo box (date : 2015-12-12, platform : bigdata,
control : bigdata and this will be concatenated as
2015-12-12|bigdata|bigdata and passed to hbase) it works and retrieves
data. But if the user chooses multiple options for either platform or
control it will fail. So help me in resolving this problem?
Thanks
On Thu, Dec 31, 2015 at 11:43 AM, Ted Yu <yu...@gmail.com> wrote:
> For the example given below, you can specify PrefixFilter for the scan.
>
> Please see also for examples of filter involving regex:
> https://issues.apache.org/jira/browse/HBASE-9428
>
> > On Dec 30, 2015, at 9:57 PM, Rajeshkumar J <ra...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > Currently i am using range scan for querying data in my hbase table. Is
> > there any option available to use regular expression in range scan. For
> ex
> > this is my range scan query
> >
> > scan 'tmp', {STARTROW => '539428', ENDROW => '539430'}
> >
> > Is there any option available so that we can use
> >
> >
> > scan 'tmp', {STARTROW => '5394.*', ENDROW => '539430'}
> >
> > Thanks
>
Re: regular expression in range scan
Posted by Ted Yu <yu...@gmail.com>.
For the example given below, you can specify PrefixFilter for the scan.
Please see also for examples of filter involving regex:
https://issues.apache.org/jira/browse/HBASE-9428
> On Dec 30, 2015, at 9:57 PM, Rajeshkumar J <ra...@gmail.com> wrote:
>
> Hi,
>
> Currently i am using range scan for querying data in my hbase table. Is
> there any option available to use regular expression in range scan. For ex
> this is my range scan query
>
> scan 'tmp', {STARTROW => '539428', ENDROW => '539430'}
>
> Is there any option available so that we can use
>
>
> scan 'tmp', {STARTROW => '5394.*', ENDROW => '539430'}
>
> Thanks