hbase shell command - scan and Filter

12,271

I've gone through some basics of Filter and scan shell commands in hbase and found that SingleColumnValueFilter is perfect for filter cells based on value. Below command worked for me:

scan 'Mytable', {COLUMNS => ['abc'], FILTER => "SingleColumnValueFilter('abc','drug',=,'binary:avil')",STARTROW => "1100", ENDROW => "1121"}

Share:
12,271
Nimisha
Author by

Nimisha

Updated on June 06, 2022

Comments

  • Nimisha
    Nimisha almost 2 years

    I am pretty new to Hadoop and hbase. Can anybody help me with the scan and filter command.

    I was trying to pull the records in hbase for a range of rows and for a particular drug, using Filter. When I am giving this shell command: scan 'Mytable', {COLUMNS => ['abc'], FILTER => "avil",STARTROW => "1100",STOPROW => "1121"}

    It is showing me an error as: Incorrect Filter String

    I am trying to use this command as a reference:

     hbase> scan 't1', {FILTER => "(PrefixFilter ('row2') AND (QualifierFilter (>=, 'binary:xyz'))) AND (TimestampsFilter ( 123, 456))"}
    

    can somebody please help me explain what is Prefixfilter and QualifierFilter?