Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Retrieving a row from value on HBase Shell

avatar
New Contributor

I have to retrieve information from all columns of a row based on a given value.

the data is

fname - John

lname - Andrews

snumber - 008

degree - MIT

 

I have this query that returns only the degree column:
scan 'CWRK', {COLUMNS => 'STUDENT', FILTER => "ValueFilter ( =, 'binaryprefix:MIT')"}

 

this gives the result:
student:008             column=STUDENT:degree, timestamp = ......... , value=MIT

I want to run a query that returns values for all 4 attributes (fname, lname, snumber, degree) for the row-number student:008 as that is the row that has the MIT value for degree key.

Can this be done?

1 ACCEPTED SOLUTION

avatar
New Contributor

I got it working with SingleColumnValueFilter

 

scan 'CWRK', {FILTER => "SingleColumnValueFilter = ('STUDENT','degree',=,'binary:MIT',true,true)"}

View solution in original post

1 REPLY 1

avatar
New Contributor

I got it working with SingleColumnValueFilter

 

scan 'CWRK', {FILTER => "SingleColumnValueFilter = ('STUDENT','degree',=,'binary:MIT',true,true)"}