Click to copy
Working With Avro • Reviewed for ksqlDB 0.29
How to Create Stream from Avro Topic in ksqlDB
To create a stream from Avro messages, you can use a CREATE STREAM
statement, skipping the fields clause:
CREATE STREAM scores_avro_stream
WITH (
KAFKA_TOPIC='scores_avro',
VALUE_FORMAT='AVRO'
);
If you have problems creating an Avro stream, make sure you have registered your Confluent Schema Registry instance with your ksqlDB instance by setting the cluster property ksql.schema.registry.url
to your registry endpoint.
Additionally, you must check that there is a registered schema for the topic specified in the KAFKA_TOPIC
property in your registry.
Was this article helpful?