This guide will go over how to set up a Kafka cluster on Confluent Cloud so you can connect and read data from it with RisingWave. See Confluent for more details and how to get started.
Create a table in RisingWave to ingest data from the Kafka topic created in Confluent Cloud.The following query will create a table that connects to the data generator created in Confluent. Remember to fill in the authentication parameters accordingly.See the Ingest data from Kafka topic for more details on the syntax and connection parameters.
Copy
Ask AI
CREATE TABLE s ( ordertime timestamp, orderid int, itemid varchar, orderunits double, address STRUCT < city varchar, state varchar, zipcode int >) WITH ( connector = 'kafka', topic = 'topic_0', properties.bootstrap.server = 'xyz-x00xx.us-east-1.aws.confluent.cloud:9092', scan.startup.mode = 'earliest', properties.security.protocol = 'SASL_SSL', properties.sasl.mechanism = 'PLAIN', properties.sasl.username = 'username', properties.sasl.password = 'password') FORMAT PLAIN ENCODE JSON;
We can also check the consumption progress on Confluent by click on Topics from the sidebar, selecting the topic we just created, and clicking on Consumption.