phoenix视图-phoneix查询原生态Hbase的表

版权声明:本文为博主原创文章,出处为 http://blog.csdn.net/silentwolfyh https://blog.csdn.net/silentwolfyh/article/details/83104764

标准的SQL视图语法现在在Phoenix上也支持了。这使得能在同一张底层HBase物理表上创建多个虚拟表。


hbase(main)> create  't1' , {NAME => 'f1', VERSIONS => 2}
hbase(main)> put 't1','rowkey001','f1:col1','value01'
hbase(main)> put 't1','rowkey002','f1:col2','value02'
hbase(main)> put 't1','rowkey003','f1:col3','value03'

create view "t1" ("ROW" varchar primary key,"f1"."col1" varchar,"f1"."col2" varchar,"f1"."col3" varchar) as select * from "t1";
drop view "t1";

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/silentwolfyh/article/details/83104764