Quickly connect RisingWave to your Apache Kafka broker to start ingesting data.
This guide shows you how to connect RisingWave to your Apache Kafka broker using either CREATE SOURCE
(for a connection without storing data) or CREATE TABLE
(for a connection that stores data in RisingWave).
ip:port
).RisingWave supports two primary methods for connecting to Kafka:
CREATE SOURCE
: Creates a connection without storing data in RisingWave. See Connecting with CREATE SOURCE
for details.CREATE TABLE
: Creates a connection and stores the ingested data in RisingWave. See Connecting with CREATE TABLE
for details.Choose the method that best suits your needs.
CREATE SOURCE
(data not stored)RisingWave supports the INCLUDE clause, which allows you to extract fields not part of the main message payload (like Kafka metadata) as separate columns in your source or table.
For the general syntax and explanation of the INCLUDE clause, see Extracting metadata from sources.
Field | Default Type | Note |
---|---|---|
key | BYTEA | Can be overwritten by ENCODE and KEY ENCODE. |
timestamp | TIMESTAMP WITH TIME ZONE | Refers to CreateTime (not LogAppendTime). |
partition | VARCHAR | The partition the message is from. |
offset | VARCHAR | The offset in the partition. |
headers | STRUCT<VARCHAR, BYTEA>[] | Key-value pairs (headers) associated with the message. |
payload | JSON | The actual content or data of the message. Only supports JSON format. |
This section shows examples for different data formats.
without_header
option to the encode parameters.delimiter
option specifies the delimiter character used in the CSV data, and it can be one of ,
, ;
, E'\t'
.To read data encrypted with SSL without SASL authentication, specify these parameters in the WITH section of your CREATE SOURCE statement.
Here is an example of creating a table encrypted with SSL without using SASL authentication.
To read data encrypted with SSL without SASL authentication, specify these parameters in the WITH section of your CREATE SOURCE statement.
Here is an example of creating a table encrypted with SSL without using SASL authentication.
Here is an example of creating a source authenticated with SASL/PLAIN without SSL encryption.
This is an example of creating a source authenticated with SASL/PLAIN with SSL encryption.
Here is an example of creating a source authenticated with SASL/SCRAM without SSL encryption.
Here is an example of creating a source authenticated with SASL/GSSAPI without SSL encryption.
Here is an example of creating a source authenticated with SASL/OAUTHBEARER without SSL encryption.
Quickly connect RisingWave to your Apache Kafka broker to start ingesting data.
This guide shows you how to connect RisingWave to your Apache Kafka broker using either CREATE SOURCE
(for a connection without storing data) or CREATE TABLE
(for a connection that stores data in RisingWave).
ip:port
).RisingWave supports two primary methods for connecting to Kafka:
CREATE SOURCE
: Creates a connection without storing data in RisingWave. See Connecting with CREATE SOURCE
for details.CREATE TABLE
: Creates a connection and stores the ingested data in RisingWave. See Connecting with CREATE TABLE
for details.Choose the method that best suits your needs.
CREATE SOURCE
(data not stored)RisingWave supports the INCLUDE clause, which allows you to extract fields not part of the main message payload (like Kafka metadata) as separate columns in your source or table.
For the general syntax and explanation of the INCLUDE clause, see Extracting metadata from sources.
Field | Default Type | Note |
---|---|---|
key | BYTEA | Can be overwritten by ENCODE and KEY ENCODE. |
timestamp | TIMESTAMP WITH TIME ZONE | Refers to CreateTime (not LogAppendTime). |
partition | VARCHAR | The partition the message is from. |
offset | VARCHAR | The offset in the partition. |
headers | STRUCT<VARCHAR, BYTEA>[] | Key-value pairs (headers) associated with the message. |
payload | JSON | The actual content or data of the message. Only supports JSON format. |
This section shows examples for different data formats.
without_header
option to the encode parameters.delimiter
option specifies the delimiter character used in the CSV data, and it can be one of ,
, ;
, E'\t'
.To read data encrypted with SSL without SASL authentication, specify these parameters in the WITH section of your CREATE SOURCE statement.
Here is an example of creating a table encrypted with SSL without using SASL authentication.
To read data encrypted with SSL without SASL authentication, specify these parameters in the WITH section of your CREATE SOURCE statement.
Here is an example of creating a table encrypted with SSL without using SASL authentication.
Here is an example of creating a source authenticated with SASL/PLAIN without SSL encryption.
This is an example of creating a source authenticated with SASL/PLAIN with SSL encryption.
Here is an example of creating a source authenticated with SASL/SCRAM without SSL encryption.
Here is an example of creating a source authenticated with SASL/GSSAPI without SSL encryption.
Here is an example of creating a source authenticated with SASL/OAUTHBEARER without SSL encryption.