Tables can be imported directly into Hive using Sqoop with the following flag --hive-import.
Once you have the tables in Hive you can get their create DDL scripts using SHOW CREATE TABLE <table name>; > On Feb 19, 2016, at 5:31 PM, Mohit Durgapal <durgapalmo...@gmail.com> wrote: > > If he can import the scripts in db2 rdbms then it can create equivalent hive > ddl script using sqoop. > > On Friday 19 February 2016, Dmitry Tolpeko <dmtolp...@gmail.com > <mailto:dmtolp...@gmail.com>> wrote: > Abhi needs to convert SQL scripts so I am afraid Sqoop will not help. > > Abhi, do you need to get equivalent Hive scripts or creating tables in Hive > will be enough (without having scripts)? The new HPL/SQL tool is designed to > execute existing DDL (created for any database), convert on the fly and > create tables in Hive. > > Will it be a good solution for you? I tested HPL/SQL using Oracle, SQL Server > and some DB2 DDL. If there are issues I can extend the tool, contact me. > > Dmitry > > > On Fri, Feb 19, 2016 at 11:55 AM, Mohit Durgapal <durgapalmo...@gmail.com > <javascript:_e(%7B%7D,'cvml','durgapalmo...@gmail.com');>> wrote: > Have you considered using Sqoop? If not, then please have a look at the > following links: > > https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_importing_data_into_hive > > <https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_importing_data_into_hive> > http://stackoverflow.com/questions/17064144/how-do-i-use-sqoop-for-importing-data-from-a-relational-db-to-sandbox-hive > > <http://stackoverflow.com/questions/17064144/how-do-i-use-sqoop-for-importing-data-from-a-relational-db-to-sandbox-hive> > > On Fri, Feb 19, 2016 at 1:04 PM, Abhishek Singh <ec.abhis...@gmail.com > <javascript:_e(%7B%7D,'cvml','ec.abhis...@gmail.com');>> wrote: > Hi, > > We have almost 1000 DB2 RDBMS tables and for those we have the DDLs (script) > available. > We are looking for a way to convert all these DB2 DDLs into Hive DDL > without writing Hive DDL statements for each and every table. Means, is there > an > automated tool available to do this? If not, then can someone please > guide me if we have to write code then what exactly needs to be done step > by step. or any simple way to avoid lots of manual work. > > Thanks > > Abhi > >