0

For example, a HBase table has columnFamilyA, columnFamilyB and columnFamilyC, for some rows, columnFamilyA does not have any column in it. I would like to scan the table and return only the rows that have at least one column in columnFamilyA.

What kind of filter should I use? I checked SingleColumnValueFilter, but it seems to only work with specific column other than columnFamily. I need all rows where columnFamiliyA contains at least one column. Not just data in columnFamiliyA, but the entire row.

2 Answers2

0

If you need only data from columnFamiliyA you can use addFamily method on Get or Scan objects.

kostya
  • 9,221
  • 1
  • 29
  • 36
  • I need all rows where columnFamiliyA contains at least one column. Not just data in columnFamiliyA, but the entire row. – user3483218 Oct 12 '15 at 03:45
  • As far as I know it is not possible using standard filters. You can change your schema to work better with the standard filters or implement a custom filter. – kostya Oct 12 '15 at 04:17
0

Or you can do scan of scan. First do scan for columFamilyA cols. Then get the rows of first scan.

ozhang
  • 171
  • 9