-
-
Save ram-pi/ab083e1f33109590092b55ff434d68d2 to your computer and use it in GitHub Desktop.
Using KSQL to convert a Kafka topic from JSON to Avro format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE STREAM sensor_events_json (sensor_id VARCHAR, temperature INTEGER, ...) | |
WITH (KAFKA_TOPIC='events-topic', VALUE_FORMAT='JSON'); | |
CREATE STREAM sensor_events_avro WITH (VALUE_FORMAT='AVRO') AS SELECT * FROM sensor_events_json; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment