Hi, I am trying to read one Kafka topic in Flink ...
# troubleshooting
m
Hi, I am trying to read one Kafka topic in Flink that is produced by the Debezium source connector in confluent Avro format. CREATE TABLE apps (
appid STRING
) WITH (
'connector' = 'kafka',
'topic' = '_applications',
'properties.bootstrap.servers' = 'localhost:9092',
'properties.group.id' = 'testGroup',
'format' = 'debezium-avro-confluent',
'debezium-avro-confluent.url'='http://schema-registry:8081/'
);
I have the below jar files in lib already - flink-avro-1.17.1.jar flink-avro-confluent-registry-1.17.1.jar I am getting the below error message - [ERROR] Could not execute SQL statement. Reason: java.lang.ClassNotFoundException: org.apache.avro.SchemaParseException Any idea, what I am missing ?
b
you need the
flink-sql-avro-*
jars instead. Notice the
-sql-
in the name. This is a fat jar used for both DataStream and Table APIs
Make sure to remove the other jars though since you’ll get conflicts in verisons
m
Thanks, @Brian Koehler This works. But now i am getting NullPointerExcpetion error. My schema registry contains fileds like below - They have NULL in types and also in default - could this be problem ? and how should it be resolved ? {\"name\":\"productGroup\",\"type\":[\"null\",\"string\"],\"default\":null}
b
Unfortunately, I can’t help you there. I haven’t worked with the debezium format before