You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by sh...@accenture.com on 2013/06/25 14:39:12 UTC

Not able to import data from "MYSQL table with composite key" to HBASE

Hi,

The requirement is:

I have a MYSQL table with composite key :

CREATE TABLE track(   album CHAR(10) NOT NULL,   dsk INTEGER NOT NULL,   posn INTEGER NOT NULL,   song VARCHAR(255),   PRIMARY KEY (album, dsk, posn) );

I browsed on GOOGLE and found out that SQOOP version 1.4.3 supports composite key -> http://www.mail-archive.com/dev@sqoop.apache.org/msg05109.html

After downloading the bundle->http://apache.spinellicreations.com/sqoop/1.4.3/ and installing it, I ran the sqoop command as below to achieve the same

bin/sqoop import -connect jdbc:mysql://localhost/arijitdb --username user --table track --hbase-table track --column-family rating --hbase-row-key album,dsk,posn --hbase-create-table

But, when I query the HBASE table, I find that indeed a table is created with name track  but, there is no data inside.

Can anybody please help?

Regards,
Shouvanik



________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

______________________________________________________________________________________

www.accenture.com

Re: Not able to import data from "MYSQL table with composite key" to HBASE

Posted by Venkat Ranganathan <vr...@hortonworks.com>.
The feature you referenced just got committed and will be part of Sqoop
1.4.4

Venkat


On Tue, Jun 25, 2013 at 5:39 AM, <sh...@accenture.com> wrote:

>  Hi,****
>
> ** **
>
> The requirement is:****
>
> ** **
>
> I have a MYSQL table with composite key :****
>
> ** **
>
> CREATE TABLE track(   album CHAR(10) NOT NULL,   dsk INTEGER NOT NULL,
> posn INTEGER NOT NULL,   song VARCHAR(255),   PRIMARY KEY (album, dsk,
> posn) );****
>
> ** **
>
> I browsed on GOOGLE and found out that SQOOP version 1.4.3 supports
> composite key ->
> http://www.mail-archive.com/dev@sqoop.apache.org/msg05109.html ****
>
> ** **
>
> After downloading the bundle->
> http://apache.spinellicreations.com/sqoop/1.4.3/ and installing it, I ran
> the sqoop command as below to achieve the same****
>
> ** **
>
> bin/sqoop import -connect jdbc:mysql://localhost/arijitdb --username user
> --table track --hbase-table track --column-family rating --hbase-row-key
> album,dsk,posn --hbase-create-table****
>
> ** **
>
> *But, *when I query the HBASE table, I find that indeed a table is
> created with name *track * but, there is no data inside.****
>
> ** **
>
> Can anybody please help?****
>
> ** **
>
> Regards,****
>
> Shouvanik****
>
> ** **
>
> ** **
>
> ------------------------------
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the e-mail by you is prohibited.
>
> Where allowed by local law, electronic communications with Accenture and
> its affiliates, including e-mail and instant messaging (including content),
> may be scanned by our systems for the purposes of information security and
> assessment of internal compliance with Accenture policy.
>
>
> ______________________________________________________________________________________
>
> www.accenture.com
>