Ask Your Question
0

MySQL to Cassandra pipeline throwing errors

asked 2018-11-20 08:47:55 -0600

anonymous user

Anonymous

MySQl Table: CREATE TABLE category ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(100) NOT NULL, status tinyint(4) NOT NULL, sort int(11) NOT NULL, percentage_in_product double NOT NULL DEFAULT '7', PRIMARY KEY (id), UNIQUE KEY name (name) ) Cassandra Table: CREATE TABLE category( id Bigint, name varchar, status Int, sort int, percentage_in_product Double, PRIMARY KEY (id) ); I'm using StreamSets Data Collector 3.1.1.0

The following error is thrown CASSANDRA_06 - Could not prepare record id'SELECT * FROM category WHERE id > ${offset} ORDER BY id::rowCount:9:10' due to: com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [int <-> java.lang.Short]

I can not attach as i don't have points

edit retag flag offensive close merge delete

Comments

It means there's no built-in codec that maps a CQL Int to java.lang.Short. Which version of Cassandra and JDBC driver are you using?

iamontheinet gravatar imageiamontheinet ( 2018-11-20 09:47:58 -0600 )edit

Sir, I'm using builting cassandra destination. Stage Name:Cassandra, Stage Instance Name: Cassandra_01, Stage Description: Writes data to Cassandra, Stage Type: Destination, Stage Library: Cassandra Java Driver 3.2.0

Mowrya K B P gravatar imageMowrya K B P ( 2018-11-20 23:39:31 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-21 18:22:19 -0600

iamontheinet gravatar image

Hi!

Codec not found for requested operation: [int <-> java.lang.Short] means there's no built-in codec that maps a CQL Int to java.lang.Short. Use Field Type Converter to perform the conversion.

Cheers, Dash

edit flag offensive delete link more

Comments

Thank you Dash got it.

Mowrya K B P gravatar imageMowrya K B P ( 2018-11-22 01:17:35 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-20 08:47:55 -0600

Seen: 26 times

Last updated: Nov 21