Created
May 17, 2023 09:41
-
-
Save BugenZhao/45e890ce5baf4d9bd81f32d991799b6c to your computer and use it in GitHub Desktop.
Kafka Simple Test
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
kafka-topics --create --bootstrap-server localhost:29092 --replication-factor 1 --partitions 4 --topic my-topic | |
create table t1 (v1 int, v2 varchar, t timestamptz as proctime()) with ( | |
connector = 'kafka', | |
topic = 'my-topic', | |
properties.bootstrap.server = '127.0.0.1:29092', | |
scan.startup.mode = 'earliest' | |
) row format json; | |
create source s1 (v1 int, v2 varchar, t timestamptz as proctime()) with ( | |
connector = 'kafka', | |
topic = 'my-topic', | |
properties.bootstrap.server = '127.0.0.1:29092', | |
scan.startup.mode = 'earliest' | |
) row format json; | |
kafka-console-producer --broker-list localhost:29092 --topic my-topic | |
>{"v1":1, "v2":"hello"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment