You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by xuxc1120 <xu...@vip.qq.com> on 2015/02/11 06:45:06 UTC
回复:Mapping HBase table in Phoenix
just as you said,it has 2 families in your table:'cf1'and 'cf2',
but you mapped "cf2"."address" into the view and you put "address" in 'cf1' family,so you will get a NULL in the view.
xuxc.
------------------ 原始邮件 ------------------
发件人: "Siva";<sb...@gmail.com>;
发送时间: 2015年2月11日(星期三) 凌晨4:46
收件人: "user"<us...@phoenix.apache.org>; "dev"<de...@phoenix.apache.org>;
主题: Mapping HBase table in Phoenix
Hi Everyone,
When I map a table in Phoenix from Hbase which has two column families, I could not able to see the data for 2nd column family from Phoenix.
Hbase:
create 'tab_2_cf', 'cf1', 'cf2'
put 'tab_2_cf', 'r1', 'cf1:name', 'asdf'
put 'tab_2_cf', 'r1', 'cf1:address', 'CALIF'
From Phoenix:
create view "tab_2_cf"(pk varchar primary key, "cf1"."name" varchar, "cf2"."address" varchar);
queried the table from phoenix, data is being shown as NULL for Column address.
0: jdbc:phoenix:172.31.45.176:2181:/hbase> select * from "tab_2_cf";
+------------+------------+------------+
| PK | name | address |
+------------+------------+------------+
| r1 | asdf | null |
+------------+------------+------------+
Any help on this?
Thanks,
Siva.