[HBase] Use SingleColumnFilter in shell.

scan 'TABLENAME', {FILTER=>"(SingleColumnValueFilter('CF', ‘CQ', =, 'binary:VALUE', true, true))”}

the first true means filterIfColumnMissing
the second true means setLatestVersionOnly

Ref. Spinning Thoughts: Applying Filters in HBase shell

This entry was posted in HBase. Bookmark the permalink.

2 Responses to [HBase] Use SingleColumnFilter in shell.

  1. cowman.chiang says:

    scan ‘TABLENAME’, {FILTER=>”(SingleColumnValueFilter(‘CF’, ‘CQ’, =, ‘binary:VALUE1’, true, true)) AND (SingleColumnValueFilter(‘CF’, ‘CQ’, =, ‘binary:VALUE2’, true, true))”}

  2. cowman.chiang says:

    scan ‘TABLENAME’, {FILTER=>”(SingleColumnValueFilter(‘CF’,’CQ’,=,’binary:\x00\x00\x00\x01′,true,true)) AND (RowFilter(=, ‘regexstring:^[^_]+$’))”}

Comments are closed.