Need help generating SQL? Use Claude Code or Cursor with the RisingWave MCP server to generate and run SQL interactively. This guide explains how to deliver processed data from RisingWave into existing Iceberg tables. Use this when you have Iceberg tables managed by external systems and want RisingWave to deliver processed results into them.Documentation Index
Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An upstream source, table, or materialized view in RisingWave to output data from.
- Existing Iceberg tables that you can deliver to, or the ability to create them via external systems.
- Appropriate permissions to deliver to the target Iceberg catalog and storage.
- Access credentials for the underlying object storage (e.g., S3 access key and secret key).
Create an Iceberg sink
To write data to an external Iceberg table, create aSINK. This statement defines how data from an upstream object should be formatted and delivered to the target Iceberg table.
Configuration parameters
| Parameter | Required | Description |
|---|---|---|
connector | Yes | Must be 'iceberg'. |
type | Yes | Sink mode. 'append-only' for new records only; 'upsert' to handle updates and deletes. |
database.name | Yes | The name of the target Iceberg database. |
table.name | Yes | The name of the target Iceberg table. |
primary_key | Yes, if type is upsert | A comma-separated list of columns that form the primary key. |
write_mode | No | Write mode for the sink. Options: 'merge-on-read' (default) or 'copy-on-write'. Important: Copy-on-write is only supported for upsert sinks. Append-only sinks must use merge-on-read. See Write modes for details. |
force_append_only | No | If true, converts an upsert stream to append-only. Updates become inserts and deletes are ignored. Default: false. |
is_exactly_once | No | Set to true to enable exactly-once delivery semantics. This provides stronger consistency but may impact performance. Default: true. Exactly-once delivery requires sink decoupling to be enabled (the default behavior). If you SET sink_decouple = false;, exactly-once semantics will be automatically disabled for the sink. |
commit_checkpoint_interval | No | Controls how often RisingWave commits to Iceberg. Default: 60 (about every 60 seconds in the default configuration). |
commit_checkpoint_size_threshold_mb | No | The buffered write size threshold in MB that triggers an early commit at the next checkpoint barrier. When uncommitted data exceeds this value, RisingWave commits on the next checkpoint instead of waiting for commit_checkpoint_interval. Must be greater than 0. Default: 128. Useful for large backfills to avoid accumulating too much uncommitted data. |
commit_retry_num | No | The number of times to retry a failed commit. Default: 8. |
create_table_if_not_exists | No | If true, RisingWave creates the external Iceberg table automatically when it does not exist. Default: false. |
partition_by | No | Specify partitioning using column names or transformations. Supported transformations include identity, truncate(n), bucket(n), year, month, day, hour, and void. Multiple columns can be separated by commas. Example: partition_by = 'truncate(4,v2),bucket(5,v1)'. For more details on Iceberg partitioning, see Partition transforms. |
auto.schema.change | No | Set to true to enable automatic schema evolution. When enabled, RisingWave automatically propagates schema changes (for example, adding columns) from the upstream source to the Iceberg table. Automatic schema evolution is only supported when exactly-once semantics are active (is_exactly_once = 'true' and sink decoupling is enabled); if exactly-once is disabled for the sink, this option has no effect and schema changes are not propagated. Currently supports ADD COLUMN operations. Default: false. |
- Object storage: Object storage configuration
- Catalogs: Catalog configuration
commit_checkpoint_interval, commit_checkpoint_size_threshold_mb, and commit_retry_num to manage commit frequency and retry behavior.
Schema evolution
RisingWave supports automatic schema evolution for Iceberg sinks, allowing schema changes from upstream sources to be automatically propagated to the target Iceberg table. This feature works with exactly-once semantics. To enable schema evolution, setauto.schema.change = 'true' when creating the sink:
Supported operations
Currently, RisingWave supports the following schema change operations:- ADD COLUMN: Automatically adds new columns to the Iceberg table when they are added to the upstream source.
How it works
When schema evolution is enabled:- RisingWave detects schema changes in the upstream source
- Schema changes are applied to the Iceberg table as atomic schema updates in the catalog
- The sink coordinates schema commits with data commits to ensure consistency
- In exactly-once mode, RisingWave ensures that schema changes are applied exactly once, even in the presence of failures