I am trying to create a new table from an existing structure in Phoenix. Is there a CREATE as Select statement in Phoenix. I am trying and they are failing with the below except
You can't do like this in Phoenix
.
Instead you need to create a view of a existing Hbase/Phoenix table first which in your case is 'test_2
'
So you can do something like this:
CREATE VIEW test_view (a VARCHAR, b VARCHAR) AS
SELECT * FROM test_2
WHERE 1 = 2 ; // some condition
For more information refer here : Phoenix