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