You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Archana Patel <ar...@vavni.com> on 2016/02/18 12:19:35 UTC
Apache sqoop and hive
hi,
I am trying to import all tables from mysql to hive by using apache sqoop but its having problem. And i have added mysql-connector-java-5.0.8-bin.jar also still having problem. Can anybody help on this who has tried this already or any idea.
Thanks ,
Archana Patel
skype(live:archana961)
Re: Apache sqoop and hive
Posted by Divya Gehlot <di...@gmail.com>.
sqoop import-all-tables \
--connect "jdbc:mysql://host_name:3306/db_name" \
--username=username \
--password=password \
--warehouse-dir=/user/hive/warehouse/hive_db.db
Have you tried this
On 19 February 2016 at 12:17, Archana Patel <ar...@vavni.com> wrote:
>
> hi , Divya
>
> Actually i am able to import single table but want to import whole
> database into hive.
> I did this.
>
> sqoop import --connect jdbc:mysql://localhost:3306/sample --username
> root -P --table demo --hive-import --hive-table default.demo -m 1
> --driver com.mysql.jdbc.Driver
>
>
> ________________________________________
> From: Divya Gehlot [divya.htconex@gmail.com]
> Sent: Friday, February 19, 2016 8:37 AM
> To: user@hive.apache.org
> Subject: Re: Apache sqoop and hive
>
> Can you please post the steps how are you doing it ?
>
>
>
> On 18 February 2016 at 19:19, Archana Patel <archanap@vavni.com<mailto:
> archanap@vavni.com>> wrote:
> hi,
>
> I am trying to import all tables from mysql to hive by using apache sqoop
> but its having problem. And i have added mysql-connector-java-5.0.8-bin.jar
> also still having problem. Can anybody help on this who has tried this
> already or any idea.
>
> Thanks ,
> Archana Patel
> skype(live:archana961)
>
>
RE: Apache sqoop and hive
Posted by Mich Talebzadeh <mi...@cloudtechnologypartners.co.uk>.
Why don't you write a simple shell scripts that connects to MySQL DB
gets a list of tables stored in a temp file and then use a loop to call
for Sqoop for every table?
This is IMO much better, and provides you more control.
HTH
On 19/02/2016 04:17, Archana Patel wrote:
> hi , Divya
>
> Actually i am able to import single table but want to import whole database into hive.
> I did this.
>
> sqoop import --connect jdbc:mysql://localhost:3306/sample --username root -P --table demo --hive-import --hive-table default.demo -m 1 --driver com.mysql.jdbc.Driver
>
> ________________________________________
> From: Divya Gehlot [divya.htconex@gmail.com]
> Sent: Friday, February 19, 2016 8:37 AM
> To: user@hive.apache.org
> Subject: Re: Apache sqoop and hive
>
> Can you please post the steps how are you doing it ?
>
> On 18 February 2016 at 19:19, Archana Patel <ar...@vavni.com>> wrote:
> hi,
>
> I am trying to import all tables from mysql to hive by using apache sqoop but its having problem. And i have added mysql-connector-java-5.0.8-bin.jar also still having problem. Can anybody help on this who has tried this already or any idea.
>
> Thanks ,
> Archana Patel
> skype(live:archana961)
--
Dr Mich Talebzadeh
LinkedIn
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
http://talebzadehmich.wordpress.com
NOTE: The information in this email is proprietary and confidential.
This message is for the designated recipient only, if you are not the
intended recipient, you should destroy it immediately. Any information
in this message shall not be understood as given or endorsed by Cloud
Technology Partners Ltd, its subsidiaries or their employees, unless
expressly so stated. It is the responsibility of the recipient to ensure
that this email is virus free, therefore neither Cloud Technology
partners Ltd, its subsidiaries nor their employees accept any
responsibility.
RE: Apache sqoop and hive
Posted by Archana Patel <ar...@vavni.com>.
hi , Divya
Actually i am able to import single table but want to import whole database into hive.
I did this.
sqoop import --connect jdbc:mysql://localhost:3306/sample --username root -P --table demo --hive-import --hive-table default.demo -m 1 --driver com.mysql.jdbc.Driver
________________________________________
From: Divya Gehlot [divya.htconex@gmail.com]
Sent: Friday, February 19, 2016 8:37 AM
To: user@hive.apache.org
Subject: Re: Apache sqoop and hive
Can you please post the steps how are you doing it ?
On 18 February 2016 at 19:19, Archana Patel <ar...@vavni.com>> wrote:
hi,
I am trying to import all tables from mysql to hive by using apache sqoop but its having problem. And i have added mysql-connector-java-5.0.8-bin.jar also still having problem. Can anybody help on this who has tried this already or any idea.
Thanks ,
Archana Patel
skype(live:archana961)
Re: Apache sqoop and hive
Posted by Divya Gehlot <di...@gmail.com>.
Can you please post the steps how are you doing it ?
On 18 February 2016 at 19:19, Archana Patel <ar...@vavni.com> wrote:
> hi,
>
> I am trying to import all tables from mysql to hive by using apache sqoop
> but its having problem. And i have added mysql-connector-java-5.0.8-bin.jar
> also still having problem. Can anybody help on this who has tried this
> already or any idea.
>
> Thanks ,
> Archana Patel
> skype(live:archana961)