You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: iceberg/deliver-to-iceberg.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ WITH (
48
48
|`database.name`| Yes | The name of the target Iceberg database. |
49
49
|`table.name`| Yes| The name of the target Iceberg table.|
50
50
|`primary_key`| Yes, if `type` is `upsert`| A comma-separated list of columns that form the primary key. |
51
+
|`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](/iceberg/write-modes) for details. |
51
52
|`force_append_only`| No | If `true`, converts an `upsert` stream to `append-only`. Updates become inserts and deletes are ignored. Default: `false`. |
52
53
|`is_exactly_once`| No | Set to `true` to enable exactly-once delivery semantics. This provides stronger consistency but may impact performance. Default: `true`. <br/><br/> Exactly-once delivery requires [sink decoupling](/delivery/overview#sink-decoupling) to be enabled (the default behavior). If you `SET sink_decouple = false;`, exactly-once semantics will be automatically disabled for the sink.|
53
54
|`commit_checkpoint_interval`| No | Controls how often RisingWave commits to Iceberg. Default: `60` (about every 60 seconds in the default configuration). |
Copy file name to clipboardExpand all lines: iceberg/write-modes.mdx
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ RisingWave supports two write modes for Iceberg sinks and tables, allowing you t
13
13
14
14
In merge-on-read mode, updates and deletes are written to separate delta files (delete files) instead of rewriting existing data files. When the data is queried, the engine merges the base data files with the delete files on the fly to produce the latest view.
15
15
16
-
This is the default write mode in RisingWave.
16
+
This is the default write mode in RisingWave and is **required** for append-only sinks and tables.
17
17
18
18
### How it works
19
19
@@ -59,6 +59,10 @@ WITH (
59
59
60
60
## Copy-on-write (CoW)
61
61
62
+
<Warning>
63
+
Copy-on-write mode is **only supported for upsert sinks and tables**. Append-only sinks must use merge-on-read mode. Attempting to create an append-only sink with `write_mode = 'copy-on-write'` will result in an error.
64
+
</Warning>
65
+
62
66
In copy-on-write mode, updates and deletes are handled by rewriting the data files that contain the affected rows. This ensures that every snapshot presents a clean, delete-free view of the data, optimizing read performance for external consumers.
63
67
64
68
### How it works
@@ -114,12 +118,18 @@ WITH (
114
118
115
119
Choose the write mode that best fits your workload and query patterns.
116
120
121
+
<Note>
122
+
**For append-only workloads**: Merge-on-read is required as it is strictly better than copy-on-write for append-only data. Copy-on-write provides no benefit when there are no updates or deletes to eagerly compact, and has worse write performance.
123
+
</Note>
124
+
117
125
***Use Merge-on-Read (MoR) if**:
118
126
* Your primary concern is write performance and low ingestion latency.
119
127
* Downstream query engines can efficiently process delete files.
120
128
* Workloads are write-heavy with frequent updates or deletes.
129
+
* Your sink is append-only (required for append-only sinks).
121
130
122
131
***Use Copy-on-Write (CoW) if**:
132
+
* Your sink or table is upsert (not available for append-only).
123
133
* Your primary concern is read performance.
124
134
* Downstream consumers do not efficiently handle delete files.
125
135
* You can tolerate higher write amplification and ingestion latency.
@@ -129,10 +139,11 @@ Choose the write mode that best fits your workload and query patterns.
0 commit comments