Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Retrieving a row from value on HBase Shell

avatar
Frequent Visitor

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
Frequent Visitor

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
Frequent Visitor

I got it working with SingleColumnValueFilter

 

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