phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: table and schema rename
Date Wed, 10 Feb 2016 02:02:25 GMT
Hi Noam,
We don't support table rename currently - please file a JIRA. Depending on
how you're using Phoenix, you may be able to do this yourself by using
views[1]. For example, given a regular Phoenix table named my_table, you
can create a view on it like this:

CREATE VIEW my_view AS SELECT * FROM TABLE my_table;

Then from your code you can query and update the view in the same way as
the table. At this point if you want to change the name of the view, you
can just drop the view and create it again using the new name (this won't
impact your data). There are some gotchas if you're using secondary
indexes, though, as indexes would get dropped when you drop the view.

HTH. Thanks,

    James

[1] http://phoenix.apache.org/views.html

On Tue, Feb 9, 2016 at 5:18 AM, Bulvik, Noam <Noam.Bulvik@teoco.com> wrote:

> Hi,
>
>
>
> Does phoenix support fast rename of table and/or  schema without the need
> to disable the table and clone the snapshot data as appears currently in
> https://hbase.apache.org/book.html#table.rename
>
>
>
> If not are there plans to support it in the future
>
>
>
> Regards,
>
> Noam
>
>
>
>
>
> ------------------------------
>
> PRIVILEGED AND CONFIDENTIAL
> PLEASE NOTE: The information contained in this message is privileged and
> confidential, and is intended only for the use of the individual to whom it
> is addressed and others who have been specifically authorized to receive
> it. If you are not the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this communication in error, or if any
> problems occur with transmission, please contact sender. Thank you.
>

Mime
View raw message