hbase DML
Last updated on November 22, 2024 pm
🧙 Questions
☄️ Ideas
数据
# 插入数据
# put '${namespaceName}:${tableName}','${rowKey}','${familyName}:${colName}','${value}'
put 'ispong_namespace:users','data1','cf1:username','zhangsan'
put 'ispong_namespace:users','data1','cf1:age','18'
# 查询数据
# get '${tableName}','${rowKey}'
get 'ispong_namespace:users','data1'
# 整行删除
# delete '${tableName}', '${rowKey}'
delete 'ispong_namespace:users','data1','cf1:username','zhangsan'
delete 'ispong_namespace:users','data1','cf1'
delete 'ispong_namespace:users','data1'
# 查看所有的row
scan 'ispong_namespace:users'
# 查询多版本数据
get 'ispong_namespace:users','data2',{COLUMN=>'cf1:username',VERSIONS=>2}
# 表分区一同清理掉
truncate 'ispong_namespace:users'
# 清空表数据
truncate_preserve 'ispong_namespace:users'
🔗 Links
hbase DML
https://ispong.isxcode.com/hadoop/hbase/hbase DML/