Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Generate Hive DDL


Copy link to this message
-
Re: Generate Hive DDL
Murtaza Doctor 2013-02-15, 23:31
Thanks Dean & Anandha, we are on Hive 0.10 and the command of course works well. Not sure how much this feature is documented.

From: Dean Wampler <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Friday, February 15, 2013 7:21 AM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Re: Generate Hive DDL

If you're using Hive v0.10, this implements the new SHOW CREATE TABLE mytable command.

On Fri, Feb 15, 2013 at 12:07 AM, Anandha L Ranganathan <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
1) download the jar from
          from Apache JIRA https://issues.apache.org/jira/browse/HIVE-967

2) run the following command to generate DDLs.

 hive --service jar <<path_to_jar>>  com.media6.hive2rdbms.job.ShowCreateTable -D db.name<http://db.name>=default -D table.name<http://table.name>=<<TABLE_NAME>>  2>/dev/null

On Thu, Feb 14, 2013 at 9:41 PM, Murtaza Doctor <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
Folks,

I was wondering if any one is aware of a way to generate Hive DDL scripts using the existing metastore which in our case is in postgres. We have a few tables which have been historically created and figuring our creating ways to get the schema as DDL so that we can keep it in under version control.  We could replicate the entire metastore would we just want 4 tables out of the 100 we already have in place.

Thanks,
murtaza
--
Dean Wampler, Ph.D.
thinkbiganalytics.com<http://thinkbiganalytics.com>
+1-312-339-1330