On Wed, Jun 9, 2010 at 2:34 PM, Edward Capriolo <[email protected]>wrote:
> > > On Wed, Jun 9, 2010 at 2:09 PM, Mark Tozzi <[email protected]> wrote: > >> Hi All, >> >> For an existing mysql database, I have a tool which dumps out the >> create table statements for all tables, and checks them into SVN on a >> daily basis, to keep the schema under version control. For various >> reasons, this works better for my team than a change script model. We >> have recently started using hive as a primary data store, and I would >> like to apply a similar idea to the hive schema. Ideally, I would >> like a command to directly dump the create table statements, but I can >> also construct them out of several outputs if all the data is >> available. In particular, I'm having a hard time finding the row >> format and partition information. >> >> I'm also interested in hearing what schema versioning techniques have >> worked for anyone else. >> >> Thanks in advance, >> >> --Mark Tozzi >> > Hey Mark :) > > show create table is in the works: > > https://issues.apache.org/jira/browse/HIVE-967 > > You can also take a look at some web interface code. Which shows how to > walk the metastore programatically. > > <trunk>hwi/web/show_table.jsp > > > > > > And the most obvious solution... describe EXTENDED table has all the information. It is not the create syntax but it has all the relevant information.
