Unable to run Sqoop scirpt to copy data to Cassandra

0 votes

Needed advise on running the scoop script to copy the data from mysql to Cassandra Table.

I am following these steps:

CREATE DATABASE books;

USE books;

CREATE TABLE authors (id INT, name VARCHAR(20), email VARCHAR(20));

SHOW TABLES;

INSERT INTO authors (id,name,email) VALUES(1,"Vivek","xuz@abc.com");

INSERT INTO authors (id,name,email) VALUES(2,"Priya","p@gmail.com");

INSERT INTO authors (id,name,email) VALUES(3,"Tom","tom@yahoo.com");

3) Creating the table in Cassandra

use labtesting;

Create table person(

id text PRIMARY KEY,

name text,

email text);

<dependency>

    <groupId>mysql</groupId>

    <artifactId>mysql-connector-java</artifactId>

    <version>8.0.13</version>

</dependency>

Place this jar at location : /usr/lib/sqoop-1.4.6.bin__hadoop-0.23/lib

5) Run this :

sqoop import --connect jdbc:mysql://127.0.0.1:3306/books --username root --table authors --split-by categoryName --cassandra-keyspace labtesting --cassandra-column-family person --cassandra-row-key id --cassandra-thrift-host localhost --cassandra-create-schema
Jul 23 in Big Data Hadoop by Tina
49 views

1 answer to this question.

0 votes
Unfortunately, this can't be achieved with open source cassandra. You need Datastax enterprise edition of cassandra for the same. These steps should work on the enterprise edition.
answered Jul 23 by Shri

Related Questions In Big Data Hadoop

0 votes
1 answer

Unable to run import script using sqoop

You are writing incorrect command. Please write ...READ MORE

answered Mar 8 in Big Data Hadoop by Raj
46 views
0 votes
1 answer
0 votes
1 answer

How to transfer data from Netezza to HDFS using Apache Sqoop?

Remove the --direct option. It gives issue ...READ MORE

answered Apr 23, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
321 views
+1 vote
1 answer

What is the process to perform an incremental data load in Sqoop?

The process to perform incremental data load ...READ MORE

answered Dec 17, 2018 in Big Data Hadoop by Frankie
• 9,810 points
436 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
3,097 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
349 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
15,205 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,128 views
0 votes
1 answer

How to import data in sqoop as a Parquet file?

Sqoop allows you to import the file ...READ MORE

answered May 15 in Big Data Hadoop by Nanda
474 views
0 votes
1 answer