oscerd commented on issue #336:
URL: 
https://github.com/apache/camel-kafka-connector-examples/issues/336#issuecomment-1074771663


   
   
   > Thank you for your help oscerd,
   > 
   > When I pass in ["Pecan","1870"] as my message I just get ["Pecan","1870"] 
in the first column of the Cassandra table. When I pass in "pecan","1871" as 
the message I get "pecan","1871" in the first column of the Cassandra table. 
What would passing the Json file line by line look like?
   
   Not sure if you noticed that you're using the TYPE field as primary key in 
your table definition
   
   CREATE TABLE pie(type varchar, invented double, PRIMARY KEY (type));
   
   In this case when you pass pecan the second time with 1781 as invented 
field, the original one (the one with 1780 as invented field, will be 
overriden).
   
   So you can change the definition in this way
   
   CREATE TABLE pie(type varchar, invented double, PRIMARY KEY (type, 
invented));
   
   Or add an id
   
   CREATE TABLE pie(id UUID PRIMARY KEY, type varchar, invented double);
   
   
   > 
   > for 1.0.x I'm using this plugin.path=/root/connectors/
   > 
   > Here is my connect-standalone.properties: 
--####################################################################### --# 
These are defaults. This file just demonstrates how to override some settings. 
bootstrap.servers=10.188.5.86:9092,10.188.5.86:9093,10.188.5.86:9094
   > 
   > --# The converters specify the format of data in Kafka and how to 
translate it into Connect data. Every Connect user will --# need to configure 
these based on the format they want their data in when loaded from or stored 
into Kafka key.converter=org.apache.kafka.connect.json.JsonConverter 
value.converter=org.apache.kafka.connect.json.JsonConverter --# 
Converter-specific settings can be passed in by prefixing the Converter's 
setting with the converter we want to apply --# it to 
key.converter.schemas.enable=true value.converter.schemas.enable=true
   > 
   > offset.storage.file.filename=/tmp/connect.offsets --# Flush much faster 
than normal, which is useful for testing/debugging 
offset.flush.interval.ms=10000
   > 
   > --# Set to a list of filesystem paths separated by commas (,) to enable 
class loading isolation for plugins --# (connectors, converters, 
transformations). The list should consist of top level directories that include 
--# any combination of: --# a) directories immediately containing jars with 
plugins and their dependencies --# b) uber-jars with plugins and their 
dependencies --# c) directories immediately containing the package directory 
structure of classes of plugins and their dependencies --# Note: symlinks will 
be followed to discover dependencies or plugins. --# Examples: 
plugin.path=/root/connectors/
   > 
   > --############################################################
   > 
   > with this CamelCassandraPieQLSink.properties: 
--############################################################ 
name=CamelCassandraQLSinkConnector topics=pie tasks.max=1 
connector.class=org.apache.camel.kafkaconnector.cql.CamelCqlSinkConnector 
key.converter=org.apache.kafka.connect.storage.StringConverter 
value.converter=org.apache.kafka.connect.storage.StringConverter
   > 
   > camel.sink.path.hosts=10.66.16.10 camel.sink.path.port=9042 
camel.sink.path.keyspace=dev camel.sink.endpoint.cql=INSERT INTO pie (type, 
invented) VALUES (?,?) camel.sink.endpoint.username=cameldevloader 
camel.sink.endpoint.password=newpassword
   > 
   > --############################################################
   > 
   > At /root/connectors/ I have : camel-cassandra-sink-kafka-connector 
camel-cql-kafka-connector
   > 
   > Both contain many jar files, here's what is in camel-cql-kafka-connector: 
HdrHistogram-2.1.12.jar jackson-dataformat-avro-2.12.2.jar LICENSE.txt 
jackson-datatype-jdk8-2.12.2.jar NOTICE.txt java-driver-core-4.11.1.jar 
README.adoc java-driver-query-builder-4.11.1.jar annotations-13.0.jar 
java-driver-shaded-guava-25.1-jre-graal-sub-1.jar 
apicurio-registry-common-1.3.2.Final.jar javax.annotation-api-1.3.2.jar 
apicurio-registry-rest-client-1.3.2.Final.jar 
jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar 
apicurio-registry-utils-converter-1.3.2.Final.jar jcip-annotations-1.0-1.jar 
apicurio-registry-utils-serde-1.3.2.Final.jar jctools-core-3.3.0.jar 
asm-9.1.jar jffi-1.3.1-native.jar asm-analysis-9.1.jar jffi-1.3.1.jar 
asm-commons-9.1.jar jnr-a64asm-1.0.0.jar asm-tree-9.1.jar 
jnr-constants-0.10.1.jar asm-util-9.1.jar jnr-ffi-2.2.2.jar avro-1.10.2.jar 
jnr-posix-3.1.5.jar camel-api-3.11.5.jar jnr-x86asm-1.0.2.jar 
camel-base-3.11.5.jar json-20090211.jar camel-base-engine-3.11.5.jar 
jsr305-3.0.2.jar
  camel-cassandraql-3.11.5.jar kafka-clients-2.8.0.jar 
camel-core-engine-3.11.5.jar kotlin-reflect-1.3.20.jar 
camel-core-languages-3.11.5.jar kotlin-stdlib-1.3.20.jar 
camel-core-model-3.11.5.jar kotlin-stdlib-common-1.3.20.jar 
camel-core-processor-3.11.5.jar lz4-java-1.7.1.jar 
camel-core-reifier-3.11.5.jar medeia-validator-core-1.1.1.jar 
camel-cql-kafka-connector-0.11.5.jar medeia-validator-jackson-1.1.1.jar 
camel-direct-3.11.5.jar metrics-core-4.1.19.jar camel-jackson-3.11.5.jar 
native-protocol-1.5.0.jar camel-kafka-3.11.5.jar netty-buffer-4.1.66.Final.jar 
camel-kafka-connector-0.11.5.jar netty-codec-4.1.66.Final.jar 
camel-main-3.11.5.jar netty-common-4.1.66.Final.jar 
camel-management-api-3.11.5.jar netty-handler-4.1.66.Final.jar 
camel-seda-3.11.5.jar netty-resolver-4.1.66.Final.jar camel-support-3.11.5.jar 
netty-transport-4.1.66.Final.jar camel-util-3.11.5.jar okhttp-4.8.1.jar 
commons-compress-1.20.jar okio-2.7.0.jar config-1.4.1.jar 
protobuf-java-3.13.0.jar connect-json-2.6.0.jar 
 reactive-streams-1.0.3.jar converter-jackson-2.9.0.jar retrofit-2.9.0.jar 
esri-geometry-api-1.2.1.jar slf4j-api-1.7.30.jar jackson-annotations-2.12.3.jar 
snappy-java-1.1.8.1.jar jackson-core-2.12.3.jar spotbugs-annotations-3.1.12.jar 
jackson-core-asl-1.9.12.jar zstd-jni-1.4.9-1.jar jackson-databind-2.12.3.jar
   > 
   > Thanks again for helping me.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to