Last active
December 17, 2022 03:20
-
-
Save miguno/40caf67d2f122d8da528d878c99a4e29 to your computer and use it in GitHub Desktop.
Using ksqlDB to convert data (i.e., events/messages) in 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