Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Created August 22, 2012 12:53
Show Gist options
  • Save joecannatti/3425322 to your computer and use it in GitHub Desktop.
Save joecannatti/3425322 to your computer and use it in GitHub Desktop.
shell.rb
scan 'patient-2-nvp', COLUMNS => ['d:subtype', 'd:ehrSystemIdQualifier'], LIMIT => 10 }
import org.apache.hadoop.hbase.filter.CompareFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter
import org.apache.hadoop.hbase.filter.SubstringComparator
import org.apache.hadoop.hbase.util.Bytes
scan 'patient-2-nvp', { COLUMNS => ['d:ehrSystemIdQualifier'], LIMIT => 2000, FILTER => SingleColumnValueFilter.new(Bytes.toBytes('d'), Bytes.toBytes('ehrSystemIdQualifier'), CompareFilter::CompareOp.valueOf('EQUAL'), SubstringComparator.new('MEDS_HX_REVIEW')) }
scan 'patient-2-nvp', { COLUMNS => ['d:ehrSystemIdQualifier'], LIMIT => 20, FILTER => SingleColumnValueFilter.new(Bytes.toBytes('d'), Bytes.toBytes('provIds'), CompareFilter::CompareOp.valueOf('NOT_EQUAL'), BinaryComparator.new(Bytes.toBytes(''))) }
scan 'patient-2-nvp', { COLUMNS => ['d:subtype'], LIMIT => 100 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment