Skip to main content
When creating a source, you can choose to persist the data from the source in RisingWave by using CREATE TABLE instead of CREATE SOURCE and specifying the connection settings and data format.

Syntax

schema_definition:
For Avro and Protobuf data, do not specify schema_definition in the CREATE SOURCE or CREATE TABLE statement. The schema should be provided in a Web location in the option schema.location in ENCODE properties section.
RisingWave performs primary key constraint checks on tables with connector settings but not on regular sources. If you need the checks to be performed, please create a table with connector settings. For a table with primary key constraints, if a new data record with an existing key comes in, the new record will overwrite the existing record.

Connector parameters

Other parameters

Message acknowledgment

Added in v2.7.0.
RisingWave automatically sends acknowledgments to the Pulsar broker for consumed messages. You can optionally configure the subscription.unacked.resend.delay parameter to control when the broker resends unacknowledged messages. If you need to bound retryable Pulsar client operations on the source side, configure pulsar.operation.retry.max.retries and pulsar.operation.retry.delay. These options control Pulsar client retries in RisingWave and do not change broker-side redelivery behavior.
Example
In this example, if the broker does not receive an acknowledgment within 10 seconds, it will resend the messages.

Read from compacted topics

Pulsar supports topic compaction, which retains only the latest message for each key in a topic. When you enable pulsar.read_compacted, RisingWave reads only the compacted view of the topic, providing the most recent value for each key. This is useful when you want to read the current state of entities without processing all historical updates.
Example
In this example, if multiple status updates exist for the same user_id, only the latest status for each user will be read from the compacted topic.
The pulsar.read_compacted option cannot be changed after the source or table is created.

Read schemas from locations

RisingWave supports reading schemas from a Web location in http://..., https://..., or S3://... format for Pulsar data in Avro or Protobuf format. For Protobuf, if a schema location is specified, the schema file must be a FileDescriptorSet, which can be compiled from a .proto file with a command like this:
To specify a schema location, add this clause to a CREATE SOURCE statement.
If a primary key also needs to be defined, use the table constraint syntax.

Example

Here is an example of connecting RisingWave to a Pulsar broker to read data from individual topics.