You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/17 16:41:13 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #3998: Flink: Support write options in FlinkSink builder

rdblue commented on code in PR #3998:
URL: https://github.com/apache/iceberg/pull/3998#discussion_r900315366


##########
docs/flink/flink-getting-started.md:
##########
@@ -526,6 +526,27 @@ FlinkSink.forRowData(input)
 env.execute("Test Iceberg DataStream");
 ```
 
+## Write options
+
+Flink write options are passed when configuring the FlinkSink, like this:
+
+```
+FlinkSink.Builder builder = FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
+    .table(table)
+    .tableLoader(tableLoader)
+    .set("write-format", "orc")
+    .set(FlinkWriteOptions.OVERWRITE_MODE, "true");
+```
+
+| Flink option           | Default                    | Description                                                  |
+| ---------------------- | -------------------------- | ------------------------------------------------------------ |
+| write-format           | Table write.format.default | File format to use for this write operation; parquet, avro, or orc |
+| target-file-size-bytes | As per table property      | Overrides this table's write.target-file-size-bytes          |
+| write.upsert.enabled | Table write.upsert.enabled | Overrides this table's write.upsert.enabled |
+| overwrite | false | Overwrite the table's data |
+| write.distribution-mode | Table write.distribution-mode | Overrides this table's write.distribution-mode |

Review Comment:
   I don't think that the `write.` prefix makes sense to have here. This is configuring a write so it is implied. This should just be `distribution-mode`.



-- 
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@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org