append
Contents
Definition
Appends a cell value at the specified table/row/column coordinates with the given postfix. It also allows to modify the custom attributes or visibility of this value (only one thing at a time).
Usage
append '[<namespace_name>:]<table_name>',
'<row_key>',
'<column_family>:<column_qualifier>',
'<cell_value_postfix>'[,
{ATTRIBUTES => {'<cell_attribute_name>' => '<cell_attribute_value>'[,...]}}] | [, {VISIBILITY => '<visibility_expression>'}]
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 |
cell_value_postfix |
A postfix for appending the specified cell value |
cell_attribute_name |
A cell attribute name |
cell_attribute_value |
A value of the specified cell attribute |
visibility_expression |
A logical expression that refers to existing visibility labels. Can use the following logical operators: |
Examples
Appending the previous cell value with some postfix
hbase(main):029:0> get 't4', 'r1' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c2 timestamp=2222221111111, value=value2 cf1:c3 timestamp=1637324768581, value=value3 cf1:c4 timestamp=1637324859512, value=value4 1 row(s) Took 0.0092 seconds hbase(main):030:0> append 't4', 'r1', 'cf1:c3', '_new' CURRENT VALUE = value3_new Took 0.0118 seconds hbase(main):031:0> get 't4', 'r1' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c2 timestamp=2222221111111, value=value2 cf1:c3 timestamp=1637326066133, value=value3_new cf1:c4 timestamp=1637324859512, value=value4 1 row(s) Took 0.0114 seconds
Changing attributes
hbase(main):004:0> append 't4', 'r1', 'cf1:c3', '', ATTRIBUTES => {'mykey' => 'myvalue'} CURRENT VALUE = value3_new Took 0.5597 seconds hbase(main):005:0> get 't4', 'r1' COLUMN CELL cf1:c1 timestamp=1637324524743, value=value1 cf1:c2 timestamp=2222221111111, value=value2 cf1:c3 timestamp=1637326657852, value=value3_new cf1:c4 timestamp=1637324859512, value=value4
Changing visibility
hbase(main):006:0> append 't4', 'r1', 'cf1:c3', '', {VISIBILITY => 'PRIVATE'} CURRENT VALUE = value3_new Took 0.0220 seconds hbase(main):007: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 1 row(s) Took 0.0117 seconds