- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hbase shell command to keep filter on multiple columns
- Labels:
-
Apache HBase
Created ‎05-10-2017 07:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a hbase table table1. Now i need to write a shell command to pick the row value by keeping filter on two columns like (c1='ABC' and c2<>'xyz'). Please help here.
Here is the command i used:
echo "scan 'table1', {COLUMNS => ['Details'],FILTER => \"(SingleColumnValueFilter('Details','ABC',=,'binary:col1',true,true)) AND (SingleColumnValueFilter('Details','XYZ',!=,'binary:col2',true,true))\"}"|hbase shell
Created ‎05-10-2017 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got the solution: echo "scan 'table1' ,{ FILTER => \"(SingleColumnValueFilter('Details','col2',!=, 'binary:XYZ')) AND (QualifierFilter (=, 'binary:col1'))\"}" |hbase shell |grep ABC |awk '{print $1}'
