Hbase shell command - scan and filter

I am new to Hadoop and hbase. Can someone help me with the scan and filter team.

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

It shows me an error like: 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 someone please help me explain what is Prefixfilter and QualifierFilter?

+3


source to share


1 answer


I went over some basic hbase filter and shell scan commands and found that SingleColumnValueFilter is ideal for value-based filter cells. The command below worked for me:



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

+5


source







All Articles