hbase_get()

描述:

查询hbase数据库中的数据,结果值返回一行记录

语法:

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

备注:

外部库函数,查询hbase数据库中的数据,结果值返回一行记录的序表

参数:

client

数据库连接信息

tableName

表名

rowName

行名称

family

列族名

column

列名

type

类型,可省略

alias

列别名,可省略

filter:f

’filter:’为固定写法,参数ffilter句柄,可省略

timeRange:[t1,t2]

‘timeRange:’为固定写法,参数t1,t2为时间戳范围,可省略

timeStamp:t

‘timeStamp:’为固定写法,参数t为时间戳,可省略

返回值:

序表

示例:

 

A

 

1

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

 

2

 

 

=hbase_scan(A1,"emp")

查询表中所有数据

3

=hbase_get(A1,"emp","row3","company:name"::cname,"company:position":string:cpos,"family:tel":string)

查询rowKey等于row3的行,并重命名列名

相关概念:

hbase_open()

hbase_scan()