You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by Santosh Shet <sa...@gmail.com> on 2013/09/23 13:36:10 UTC
Unable to export data from Cassandra to MySql
Hi,
We are facing problem while exporting data from Cassandra to MySql
database. For example,
1. I have created keyspace called test_ks and column family called
test_cfin cassandra using cql.
I have inserted some dummy data into test_cf and corresponding files are
created in the folder /var/lib/cassandra/data/test_ks/test_cf as shown
below.
[root@balnsand01 test_cf]# pwd
/var/lib/cassandra/data/test_ks/test_cf
[root@balnsand01 test_cf]# ls -lrt
total 24
-rw-r--r-- 1 root root 4340 Sep 19 03:39 test_ks-test_cf-hf-1-Statistics.db
-rw-r--r-- 1 root root 22 Sep 19 03:39 test_ks-test_cf-hf-1-Index.db
-rw-r--r-- 1 root root 16 Sep 19 03:39 test_ks-test_cf-hf-1-Filter.db
-rw-r--r-- 1 root root 89 Sep 19 03:39 test_ks-test_cf-hf-1-Data.db
-rw-r--r-- 1 root root 46 Sep 19 03:39 test_ks-test_cf-hf-1-CompressionInfo.db
1. When i am trying to export this data into MySql using below command,
I see data is getting exported in non-readable format. I mean i am not able
to see data which i have inserted in cassandra.
./dse sqoop export --connect jdbc:mysql://127.0.0.1:3306/testdb --username
testuser --password mysql123 --export-dir
/var/lib/cassandra/data/test_ks/test_cf --table <table_name> --columns
'col1,col2' --input-fields-terminated-by '\t';
where, --export-dir /var/lib/cassandra/data/test_ks/test_cf is the path
where data files gets created.
Could you please guide me where exactly I am doing wrong here.
Thanks in advance,
Santosh
Re: Unable to export data from Cassandra to MySql
Posted by Abraham Elmahrek <ab...@cloudera.com>.
Thank you Santosh!
On Tue, Sep 24, 2013 at 3:18 AM, Santosh Shet <sa...@gmail.com> wrote:
> Hello Abraham,
>
> Thank you very much for the response. I am using sqoop and hadoop which
> are available along with datastax enterprise framework.
> sqoop version :1.4.2.1.
> Hadoop version :Hadoop 1.0.4.2
> I have already sent mail to cassandra team asking for the help.
>
> Thanks and regards,
>
> Santosh
>
>
> On Mon, Sep 23, 2013 at 11:14 PM, Abraham Elmahrek <ab...@cloudera.com>wrote:
>
>> Hey Santosh,
>>
>> Unfortunately, Sqoop does not officially support Cassandra. I'm not sure
>> what version/distribution of Sqoop you are using, but I would refer to
>> their support for help in this issue.
>>
>> -Abe
>>
>>
>> On Mon, Sep 23, 2013 at 4:36 AM, Santosh Shet <sa...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> We are facing problem while exporting data from Cassandra to MySql
>>> database. For example,
>>> 1. I have created keyspace called test_ks and column family called
>>> test_cf in cassandra using cql.
>>>
>>> I have inserted some dummy data into test_cf and corresponding files
>>> are created in the folder /var/lib/cassandra/data/test_ks/test_cf as
>>> shown below.
>>>
>>> [root@balnsand01 test_cf]# pwd
>>> /var/lib/cassandra/data/test_ks/test_cf
>>> [root@balnsand01 test_cf]# ls -lrt
>>>
>>> total 24
>>> -rw-r--r-- 1 root root 4340 Sep 19 03:39 test_ks-test_cf-hf-1-Statistics.db
>>> -rw-r--r-- 1 root root 22 Sep 19 03:39 test_ks-test_cf-hf-1-Index.db
>>> -rw-r--r-- 1 root root 16 Sep 19 03:39 test_ks-test_cf-hf-1-Filter.db
>>> -rw-r--r-- 1 root root 89 Sep 19 03:39 test_ks-test_cf-hf-1-Data.db
>>> -rw-r--r-- 1 root root 46 Sep 19 03:39 test_ks-test_cf-hf-1-CompressionInfo.db
>>>
>>>
>>> 1. When i am trying to export this data into MySql using below
>>> command, I see data is getting exported in non-readable format. I mean i am
>>> not able to see data which i have inserted in cassandra.
>>>
>>> ./dse sqoop export --connect jdbc:mysql://127.0.0.1:3306/testdb--username testuser --password mysql123 --export-dir
>>> /var/lib/cassandra/data/test_ks/test_cf --table <table_name> --columns
>>> 'col1,col2' --input-fields-terminated-by '\t';
>>>
>>> where, --export-dir /var/lib/cassandra/data/test_ks/test_cf is the path
>>> where data files gets created.
>>>
>>> Could you please guide me where exactly I am doing wrong here.
>>>
>>> Thanks in advance,
>>>
>>> Santosh
>>>
>>>
>>
>
Re: Unable to export data from Cassandra to MySql
Posted by Santosh Shet <sa...@gmail.com>.
Hello Abraham,
Thank you very much for the response. I am using sqoop and hadoop which are
available along with datastax enterprise framework.
sqoop version :1.4.2.1.
Hadoop version :Hadoop 1.0.4.2
I have already sent mail to cassandra team asking for the help.
Thanks and regards,
Santosh
On Mon, Sep 23, 2013 at 11:14 PM, Abraham Elmahrek <ab...@cloudera.com> wrote:
> Hey Santosh,
>
> Unfortunately, Sqoop does not officially support Cassandra. I'm not sure
> what version/distribution of Sqoop you are using, but I would refer to
> their support for help in this issue.
>
> -Abe
>
>
> On Mon, Sep 23, 2013 at 4:36 AM, Santosh Shet <sa...@gmail.com> wrote:
>
>> Hi,
>>
>> We are facing problem while exporting data from Cassandra to MySql
>> database. For example,
>> 1. I have created keyspace called test_ks and column family called
>> test_cf in cassandra using cql.
>>
>> I have inserted some dummy data into test_cf and corresponding files are
>> created in the folder /var/lib/cassandra/data/test_ks/test_cf as shown
>> below.
>>
>> [root@balnsand01 test_cf]# pwd
>> /var/lib/cassandra/data/test_ks/test_cf
>> [root@balnsand01 test_cf]# ls -lrt
>>
>> total 24
>> -rw-r--r-- 1 root root 4340 Sep 19 03:39 test_ks-test_cf-hf-1-Statistics.db
>> -rw-r--r-- 1 root root 22 Sep 19 03:39 test_ks-test_cf-hf-1-Index.db
>> -rw-r--r-- 1 root root 16 Sep 19 03:39 test_ks-test_cf-hf-1-Filter.db
>> -rw-r--r-- 1 root root 89 Sep 19 03:39 test_ks-test_cf-hf-1-Data.db
>> -rw-r--r-- 1 root root 46 Sep 19 03:39 test_ks-test_cf-hf-1-CompressionInfo.db
>>
>>
>> 1. When i am trying to export this data into MySql using below
>> command, I see data is getting exported in non-readable format. I mean i am
>> not able to see data which i have inserted in cassandra.
>>
>> ./dse sqoop export --connect jdbc:mysql://127.0.0.1:3306/testdb--username testuser --password mysql123 --export-dir
>> /var/lib/cassandra/data/test_ks/test_cf --table <table_name> --columns
>> 'col1,col2' --input-fields-terminated-by '\t';
>>
>> where, --export-dir /var/lib/cassandra/data/test_ks/test_cf is the path
>> where data files gets created.
>>
>> Could you please guide me where exactly I am doing wrong here.
>>
>> Thanks in advance,
>>
>> Santosh
>>
>>
>
Re: Unable to export data from Cassandra to MySql
Posted by Abraham Elmahrek <ab...@cloudera.com>.
Hey Santosh,
Unfortunately, Sqoop does not officially support Cassandra. I'm not sure
what version/distribution of Sqoop you are using, but I would refer to
their support for help in this issue.
-Abe
On Mon, Sep 23, 2013 at 4:36 AM, Santosh Shet <sa...@gmail.com> wrote:
> Hi,
>
> We are facing problem while exporting data from Cassandra to MySql
> database. For example,
> 1. I have created keyspace called test_ks and column family called test_cfin cassandra using cql.
>
> I have inserted some dummy data into test_cf and corresponding files are
> created in the folder /var/lib/cassandra/data/test_ks/test_cf as shown
> below.
>
> [root@balnsand01 test_cf]# pwd
> /var/lib/cassandra/data/test_ks/test_cf
> [root@balnsand01 test_cf]# ls -lrt
>
> total 24
> -rw-r--r-- 1 root root 4340 Sep 19 03:39 test_ks-test_cf-hf-1-Statistics.db
> -rw-r--r-- 1 root root 22 Sep 19 03:39 test_ks-test_cf-hf-1-Index.db
> -rw-r--r-- 1 root root 16 Sep 19 03:39 test_ks-test_cf-hf-1-Filter.db
> -rw-r--r-- 1 root root 89 Sep 19 03:39 test_ks-test_cf-hf-1-Data.db
> -rw-r--r-- 1 root root 46 Sep 19 03:39 test_ks-test_cf-hf-1-CompressionInfo.db
>
>
> 1. When i am trying to export this data into MySql using below
> command, I see data is getting exported in non-readable format. I mean i am
> not able to see data which i have inserted in cassandra.
>
> ./dse sqoop export --connect jdbc:mysql://127.0.0.1:3306/testdb--username testuser --password mysql123 --export-dir
> /var/lib/cassandra/data/test_ks/test_cf --table <table_name> --columns
> 'col1,col2' --input-fields-terminated-by '\t';
>
> where, --export-dir /var/lib/cassandra/data/test_ks/test_cf is the path
> where data files gets created.
>
> Could you please guide me where exactly I am doing wrong here.
>
> Thanks in advance,
>
> Santosh
>
>