[ 
https://issues.apache.org/jira/browse/PHOENIX-5054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16705223#comment-16705223
 ] 

Ankit Singhal commented on PHOENIX-5054:
----------------------------------------

{quote}what do you folks think?{quote}
I think it is very useful for user as well in many cases, like setting up the 
replication or migration of phoenix table as they may not have proper track of 
all ALTERs has been done on the table.

{quote} This would be nice for indexes - when you want to rebuild 
asynchronously, currently you need to drop and recreate the index 
(PHOENIX-4703). To do that, the operator needs the "create index" DDL.{quote}
Yes having the same for all entities would be good. (like something mysql has 
SHOW CREATE TABLE/VIEW/INDEX <entity> or any other SQL syntax we all agree on)

{quote}It might be a little trickier to figure out what table properties 
because some of them are HBase table properties (REPLICATION_SCOPE etc)
{quote}
I think that can be built from HBase table descriptor , it may be possible that 
generated CREATE table command has more info than the one used originally but I 
think this is same for other databases too. I agree , pre-splits are hard to 
determine but that's something HBase doesn't store anywhere so we should also 
be fine with the caveat.


> "look up" the `CREATE TABLE` statement used for a table
> -------------------------------------------------------
>
>                 Key: PHOENIX-5054
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5054
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Josh Elser
>            Priority: Major
>
> This is a super common problem we run into:
>  # User files report/complaint
>  # We ask for DDLs for table and any indexes
>  # We receive the output of `describe <table>` from the HBase shell
> Presumably, we have all of the necessary information inside of 
> {{SYSTEM.CATALOG}}, we could recreate the {{CREATE TABLE}} statement for a 
> table, no? I think it would be super helpful to, at a given point in time, 
> obtain the {{CREATE TABLE}} statement to recreate a table as it currently 
> exists.
> Split points might be the only thing we can't explicitly do via Phoenix, but 
> that's pretty minor compared to everything else.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to