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, 2019 in Big Data Hadoop by Tina
1,158 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, 2019 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, 2019 in Big Data Hadoop by Raj
732 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,390 points
1,727 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,830 points
5,395 views
+1 vote
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
• 11,380 points
10,996 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
• 11,380 points
2,511 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,617 views
–1 vote
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,390 points
4,594 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, 2019 in Big Data Hadoop by Nanda
10,979 views
0 votes
1 answer

How to fetch more data from database while using Sqoop import?

Hey. You guessed it right. The max ...READ MORE

answered May 15, 2019 in Big Data Hadoop by Gani
2,574 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP