What is a sink?
A sink in RisingWave is a connection that continuously delivers processed data to an external downstream system. Sinks are the output stage of a streaming pipeline — they take results from materialized views, tables, or queries and write them to systems like Kafka, PostgreSQL, Iceberg, Snowflake, or Elasticsearch. When you create a sink withCREATE SINK, RisingWave establishes a persistent connection to the target system and continuously streams updates as the upstream data changes. Sinks do not store data inside RisingWave — they push data out.
How sinks work
- A materialized view — most common; delivers continuously updated results.
- A table — delivers the current state and all subsequent changes.
- An inline query — defines the transformation directly in the sink statement.
Sink types: append-only vs. upsert
RisingWave supports two sink emission modes:| Mode | Behavior | Primary key required | Use case |
|---|---|---|---|
| Append-only | Inserts only; no updates or deletes | No | Log-style destinations, event streams |
| Upsert | Inserts, updates, and deletes by primary key | Yes | Database tables, search indexes, key-value stores |
Supported sink connectors
RisingWave supports a broad set of sink connectors: Message brokers: Apache Kafka, Apache Pulsar, Amazon Kinesis, NATS, Google Pub/Sub, MQTT Databases: PostgreSQL, MySQL, ClickHouse, StarRocks, Doris, TiDB, BigQuery, DynamoDB, CockroachDB Data lakes: Apache Iceberg, Delta Lake Search and analytics: Elasticsearch, OpenSearch Object storage: Amazon S3, Google Cloud Storage, Azure Blob Storage Data warehouses: Snowflake Key-value stores: Redis, Cassandra For the full list, see Supported sink connectors.Delivery semantics
RisingWave uses a barrier-based checkpoint mechanism to provide exactly-once state updates for internal stream processing. End-to-end delivery guarantees for sinks are connector-dependent — most sinks provide at-least-once delivery, while specific connectors (such as Iceberg withis_exactly_once=true and sink decoupling enabled) support exactly-once delivery. For the precise semantics by connector, see Delivery semantics.
Related topics
- CREATE SINK — SQL reference
- Delivery overview — Full connector list
- Source, Table, MV, and Sink — Core object comparison