1
votes

I have connected kafka to mysql. The topic contains data in AVRO format. Now i want to convert that data into CSV format . For that i am using KSQL stream. When i am creating stream like

CREATE STREAM source_avro WITH (KAFKA_TOPIC='kafka', VALUE_FORMAT='AVRO');

(If i am running consumer command with same topic it is showing data) and then giving select * from source_avro it is not showing any data.

SET 'auto.offset.reset'='earliest'; (Already done).

Following these steps

Kindly help with the solution on the conversion from AVRO to CSV and whats wrong with the stream created.

1
What does PRINT 'source_avro' FROM BEGINNING show you? docs.confluent.io/current/ksql/docs/developer-guide/…Michael G. Noll

1 Answers

0
votes

CREATE STREAM source_avro WITH (KAFKA_TOPIC='kafka', VALUE_FORMAT='AVRO');

Are you sure the topic into which the MySQL data is being ingested is called kafka?

I'd first inspect the topic's data with PRINT (https://docs.confluent.io/current/ksql/docs/developer-guide/syntax-reference.html#print):

PRINT 'nameOfYourActualInputTopic' FROM BEGINNING;