Not sure if you have custom time stamp set when the values were persisted. Here is the time stamp issue I discovered with view. The solution (work around) is in the last post:
http://apache-phoenix-user-list.1124778.n5.nabble.com/View-timestamp-on-existing-table-potential-defect-td3475.html Randy On Fri, Jun 16, 2017 at 2:07 PM, M. Aaron Bossert [via Apache Phoenix User List] <[email protected]> wrote: > *I have an existing HBase table with the following characteristics:* > > hbase(main):032:0> describe 'bro' > > Table bro is ENABLED > > > > bro, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix. > coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => > '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', > coprocessor > > $3 => > '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', > coprocessor$4 => '|org.apache.phoenix.coprocessor. > ServerCachingEndpointImpl|805306366|', METADATA => {'COMPACTION_ENABLED' > => 'true'} > > } > > > > COLUMN FAMILIES DESCRIPTION > > > > {NAME => 'bm', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => > 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL > => 'FOREVER', COMPRESSION => 'LZ4', MIN_VERSIONS => '0', BLOCKCACHE => 'tr > > ue', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} > > > > {NAME => 'uid', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => > 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL > => 'FOREVER', COMPRESSION => 'LZ4', MIN_VERSIONS => '0', BLOCKCACHE => 't > > rue', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} > > > > 2 row(s) in 0.0300 seconds > > > *When I try to create a Phoenix VIEW (Phoenix 4.7) as such:* > > > 0: jdbc:phoenix:pocc2.net:2181> CREATE VIEW "bro" (pk VARCHAR PRIMARY > KEY, "bm"."id.orig_h" VARCHAR, "bm"."id.orig_p" VARCHAR, "bm"."id_resp_h" > VARCHAR, "bm"."id_resp_p" VARCHAR, "bm"."proto" VARCHAR) AS SELECT * FROM > "bro"; > > No rows affected (0.019 seconds) > > > *I see no errors at all, but when I try to query, there are no results. I > verified that the columns in question are entered using the > Bytes.toBytes(String) method in my code, thus my choice of VARCHAR.* > > > 0: jdbc:phoenix:pocc2.net:2181> select * from "bro"; > > *+-----+------------+------------+------------+------------+--------+* > > *| **PK ** | **id.orig_h ** | **id.orig_p ** | **id_resp_h ** | * > *id_resp_p ** | **proto ** |* > > *+-----+------------+------------+------------+------------+--------+* > > *+-----+------------+------------+------------+------------+--------+* > > No rows selected (0.078 seconds) > > > *Any assistance would be greatly appreciated...* > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://apache-phoenix-user-list.1124778.n5.nabble.com/ > Create-View-of-Existing-HBase-table-tp3678.html > To start a new topic under Apache Phoenix User List, email > [email protected] > To unsubscribe from Apache Phoenix User List, click here > <http://apache-phoenix-user-list.1124778.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cnV3ZWloQGdtYWlsLmNvbXwxfC04OTI3ODY3NTc=> > . > NAML > <http://apache-phoenix-user-list.1124778.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-phoenix-user-list.1124778.n5.nabble.com/Create-View-of-Existing-HBase-table-tp3678p3682.html Sent from the Apache Phoenix User List mailing list archive at Nabble.com.
