hbase_get()

Description:

Query data in HBase database and return a single row.

Syntax:

hbase_get(client,tableName,rowName,family:column:type:alias,family2:column2:type:alias2,...;filter:f,timeRange:[t1,t2],timeStamp:t)

Note:

This external library function queries a HBbase database to return a sing-row table sequence.

Parameters:

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

timeStamp:t

timeStamp:’ is a fixed format, and parameter t is timestamp; can be omitted

Return value:

Table sequence

Example:

 

A

 

1

=hbase_open("hdfs://192.168.0.8", "192.168.0.8")

 

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 functions:

  hbase_open()

  hbase_scan()