0
我知道Hbase
是不是像正常SQL
。查詢hbase像正常sql
但是有可能查詢Hbase這樣的東西嗎?
select row-key from Table
where cf:first="ram" and cf:middle="leela" and cf:last="ban";
// ram(first name) leela(middle name) ban(last name)
我知道Hbase
是不是像正常SQL
。查詢hbase像正常sql
但是有可能查詢Hbase這樣的東西嗎?
select row-key from Table
where cf:first="ram" and cf:middle="leela" and cf:last="ban";
// ram(first name) leela(middle name) ban(last name)
有這樣做的方法有兩種:
CREATE EXTERNAL TABLE employees ( empid int, ename String ) ROW FORMAT DELIMITED COLLECTION ITEMS TERMINATED BY '#' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:ename") TBLPROPERTIES ("hbase.table.name" = "employees");