本文介绍了无法在Phoenix View中查看列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在HBase中有一个推特表,请在下面找到它的描述,使用hbase describe tweet
I have a tweet table in HBase,Please find below it's description using hbase describe tweet
{NAME => 'tweets', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICAT
ION_SCOPE => '0', COMPRESSION => 'GZ', VERSIONS => '1', TTL => 'FOREVER', MIN_VE
RSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY =>
'false', BLOCKCACHE => 'true'}
并在Phoenix中创建了相应的视图
and created it's corresponding view in Phoenix as
CREATE VIEW "tweets" ( pk VARCHAR PRIMARY KEY,"tweets".fromuser VARCHAR );
但是当我做 Select * fromtweets
,我只能看到主键,来自用户列的数据是空的,同样的事情发生在我做的时候
But when i do Select * from "tweets"
,I can see only primary keys,fromuser column data is empty ,same thing happens when i do
select fromuser from "tweets"
推荐答案
创建视图时,必须双引号列名称以及列名称:
When creating your views you have to double quote the column family name as well as the column's name:
CREATE VIEW "tweets" ( pk VARCHAR PRIMARY KEY,"tweets"."fromuser" VARCHAR );
所以在上面的示例中,您需要在fromuser周围放置双引号。
So in your example above you need to put double quotes around "fromuser".
这篇关于无法在Phoenix View中查看列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!