get
Usage
-
Basic syntax:
get '[<namespace_name>:]<table_name>', '<row_key>'[, '<column_family>:<column_qualifier>'[,...]]
-
Using dictionaries:
get '[<namespace_name>:]<table_name>', '<row_key>', {COLUMN => <columns_array[]>[, VERSIONS => <number_displayed_versions>][, TIMESTAMP => <cell_timestamp>][, TIMERANGE => [<timestamp_start>, <timestamp_end>][, ATTRIBUTES => {'<cell_attribute_name>' => '<cell_attribute_value>'[,...]}]}
-
Using row-scope time ranges:
get '[<namespace_name>:]<table_name>', '<row_key>', {TIMERANGE => [<timestamp_start>, <timestamp_end>]}
-
Using filters:
get '[<namespace_name>:]<table_name>', '<row_key>', {FILTER => "<filter_description>"}
Parameter | Description |
---|---|
namespace_name |
A namespace name |
table_name |
A table name |
row_key |
A row key |
column_family |
A column family name |
column_qualifier |
A column qualifier |
columns_array |
An array of strings specified in the format |
number_displayed_versions |
A count of the cell versions to be displayed |
cell_timestamp |
A cell timestamp |
timestamp_start |
A start value for searching cells timestamps |
timestamp_end |
A stop value for searching cells timestamps |
cell_attribute_name |
A cell attribute name |
cell_attribute_value |
A value of the specified cell attribute |
filter_description |
A filter used for searching the table cells |
Examples
Getting the whole row
hbase(main):013:0> get 't4', 'r1' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c2 timestamp=2222221111111, value=value2 cf1:c3 timestamp=1637326735791, value=value3_new cf1:c4 timestamp=1637324859512, value=value4 cf1:c5 timestamp=1637329193429, value=7738718b 1 row(s) Took 0.0125 seconds
Getting the specified column cell
hbase(main):014:0> get 't4', 'r1', 'cf1:c1' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 1 row(s) Took 0.0239 seconds
Getting multiple columns
hbase(main):016:0> get 't4', 'r1', {COLUMN => ['cf1:c1', 'cf1:c5']} COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c5 timestamp=1637329193429, value=7738718b 1 row(s) Took 0.0075 seconds hbase(main):017:0> get 't4', 'r1', 'cf1:c1', 'cf1:c3' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c3 timestamp=1637326735791, value=value3_new 1 row(s) Took 0.0171 seconds
Using TIMERANGE
hbase(main):019:0> get 't4', 'r1', {TIMERANGE => [1637324524743, 1637326735791]} COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c4 timestamp=1637324859512, value=value4 1 row(s) Took 0.0127 seconds
Getting several value versions of one column
hbase(main):021:0> get 't4', 'r1', {COLUMN => 'cf1:c5', VERSIONS => 5} COLUMN CELL cf1:c5 timestamp=1637329193429, value=7738718b cf1:c5 timestamp=1637329190124, value=7738718a cf1:c5 timestamp=1637329187604, value=7738718W cf1:c5 timestamp=1637328326920, value=7738718M 1 row(s) Took 0.0148 seconds
Getting the specified value version
hbase(main):022:0> get 't4', 'r1', {COLUMN => 'cf1:c5', TIMESTAMP => 1637329190124} COLUMN CELL cf1:c5 timestamp=1637329190124, value=7738718a 1 row(s) Took 0.0146 seconds
Using a filter
hbase(main):015:0> get 't4', 'r1', {FILTER => "ValueFilter(=, 'regexstring:value*')"} COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c2 timestamp=2222221111111, value=value2 cf1:c3 timestamp=1637326735791, value=value3_new cf1:c4 timestamp=1637324859512, value=value4 1 row(s) Took 0.0973 seconds