Apache Phoenix Create statement as select (from)

后端 未结 1 711
暗喜
暗喜 2021-01-23 05:22

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

1条回答
  •  旧巷少年郎
    2021-01-23 06:01

    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

    0 讨论(0)
提交回复
热议问题