Description:
Query data in HBase database and return a one-row table sequence.
Syntax:
hbase_get(client,tableName,rowName,family:column:type:alias,family2:column2:type:alias2,...;filter:f,timeRange:[t1,t2]).
Note:
This HbaseCli external library function (See External Library Guide) queries an HBbase database to return a sing-row table sequence.
Parameter:
|
client |
Database connection information. |
|
tableName |
Table name. |
|
rowName |
Row name. |
|
family |
Column family name. |
|
column |
Colum name. |
|
type |
Data type; can be omitted. |
|
alias |
Another name of a column; can be omitted. |
|
filter:f |
“filter:” is a fixed format, and parameter f means filter handle; can be omitted. |
|
timeRange:[t1,t2] |
‘“timeRange:”’ is a fixed format, and parameters t1 and t2 specify a range of timestamp; can be omitted. |
Return value:
Table sequence
Example:
|
|
A |
|
|
1 |
=hbase_open("hdfs://192.168.0.8:9000") |
|
|
2 |
=hbase_scan(A1,"emp") |
Query all table data. |
|
3 |
=hbase_get(A1,"emp","row3","company:name"::cname,"company:position":string:cpos,"family:tel":string) |
Find a row whose rowkey is row3, and rename column names. |
Related function:
