Click to copy

• 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'
);

Troubleshooting

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.

Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like