You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/19 09:36:51 UTC

[GitHub] [flink-table-store] JingsongLi commented on a diff in pull request #228: [FLINK-28458] Add documentation for append-only table

JingsongLi commented on code in PR #228:
URL: https://github.com/apache/flink-table-store/pull/228#discussion_r924282414


##########
docs/content/docs/development/create-table.md:
##########
@@ -248,3 +248,42 @@ __Note:__
 - Partial update is only supported for table with primary key.
 - Partial update is not supported for streaming consuming.
 - It is best not to have NULL values in the fields, NULL will not overwrite data.
+
+
+## Append-only Table
+
+Append-only tables are a performance feature that only accepts `INSERT_ONLY` data to append to the storage instead of 
+updating or de-duplicating the existing data, and hence suitable for use cases that do not require updates (such as log data synchronization).
+
+### Create Append-only Table
+
+By specifying the core option `'write-mode'` to `'append-only'`, users can create an append-only table as follows.
+
+```sql
+CREATE TABLE IF NOT EXISTS AppendOnlyTable (
+    f0 INT,
+    f1 DOUBLE,
+    f2 STRING
+) WITH (
+    'write-mode' = 'append-only'
+)
+```
+__Note:__
+- By definition, users cannot define primary keys on an append-only table.
+- Append-only table is different from a change-log table which does not define primary keys. 
+  For the latter, it accepts updating or deleting the whole row, although no primary key is present.
+

Review Comment:
   Should we add description for `bucket-key`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org