You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Swapna Swapna <ta...@gmail.com> on 2016/05/11 03:46:45 UTC

Create view using select *

I have an existing hbase table with 50k columns.

Can we create a view in phoenix by mapping to an existing hbase table
without specifying the schema of all 50k columns.

Something like:

Create view myview (pk varchar primary key) as select * from hbasetable

For all columns to be available in my view without specifying schema of all
50k columns.

Re: Create view using select *

Posted by Ankit Singhal <an...@gmail.com>.
And , also look at the dynamic column support.
https://phoenix.apache.org/dynamic_columns.html

You don't need to specify all the columns at the time of create view and
you can still query other columns by specifying them during the query.

On Wed, May 11, 2016 at 2:32 PM, Sergey Soldatov <se...@gmail.com>
wrote:

> Actually it works exactly as you want.
> https://phoenix.apache.org/views.html
> Please also read Limitations chapter. It may be useful.
>
> On Tue, May 10, 2016 at 8:46 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
> > I have an existing hbase table with 50k columns.
> >
> > Can we create a view in phoenix by mapping to an existing hbase table
> > without specifying the schema of all 50k columns.
> >
> > Something like:
> >
> > Create view myview (pk varchar primary key) as select * from hbasetable
> >
> > For all columns to be available in my view without specifying schema of
> all
> > 50k columns.
>

Re: Create view using select *

Posted by Sergey Soldatov <se...@gmail.com>.
Actually it works exactly as you want.
https://phoenix.apache.org/views.html
Please also read Limitations chapter. It may be useful.

On Tue, May 10, 2016 at 8:46 PM, Swapna Swapna <ta...@gmail.com> wrote:
> I have an existing hbase table with 50k columns.
>
> Can we create a view in phoenix by mapping to an existing hbase table
> without specifying the schema of all 50k columns.
>
> Something like:
>
> Create view myview (pk varchar primary key) as select * from hbasetable
>
> For all columns to be available in my view without specifying schema of all
> 50k columns.