There isn't one using Sqoop2 yet. We're working on Hive integration through Kite.
Have you tried to call the command line from Java? On Mon, Feb 9, 2015 at 9:12 PM, Syed Akram <[email protected]> wrote: > Yes, i ran sqoop through command line. Through command line there was no > problem, Only problem using java to run sqoop? > > Is there any solution using sqoop2. Please let me know how can i do this. > > Thanks > > > ---- On Tue, 10 Feb 2015 02:02:57 +0530 *Abraham > Elmahrek<[email protected] <[email protected]>>* wrote ---- > > Hey Syed, > > Have you tried about running Sqoop via the command line or as a bash > script instead? > > -Abe > > On Mon, Feb 9, 2015 at 4:59 AM, Syed Akram <[email protected]> > wrote: > > edit: > > > *String db = "dbname"; * > *for (int i=0;i<tables.size();i++)* > *{* > > *String tableName = tables.get(i);* > * String[] str = {"create-hive-table", "--connect", > jdbc:mysql://myip:port, "--table", tableName,* > * "--hive-table", db+"."+tableName, > "--fields-terminated-by", ",",* > * "--username", "username", "--password", "password"};* > * Sqoop.runTool(str);* > *}* > > > > ---- On Mon, 09 Feb 2015 18:26:21 +0530 *Syed > Akram<[email protected] <[email protected]>>* wrote ---- > > Hi, > > Iam trying to do sqoop create-hive-table for one db which have 600 tables, > sequentially. > But only first table of that db, schema is created in hive, other tables > schemas are not being created in hive. and no error message showing where > iam going wrong. > > below java code i'm using to do that > > > > *for (int i=0;i<tables.size();i++)* > > *{* > * String[] str = {"create-hive-table", "--connect", > jdbc:mysql://myip:port, "--table", tableName,* > * "--hive-table", db+"."+tableName, > "--fields-terminated-by", ",",* > * "--username", "username", "--password", "password"};* > * Sqoop.runTool(str);* > *}* > > Please tell me where iam going wrong > > > Thanks > > > > > > > > >
