Flink: Support write options in FlinkSink builder#3998
Conversation
|
initially, I misread the intention was to do partition overwrite for commit Can we update the PR title to sth like "Support override write configuration on top of table properties in FlinkSink builder"? |
db3b8b0 to
36e434b
Compare
rdblue
left a comment
There was a problem hiding this comment.
This looks close, but I think that this changes behavior when the table is set through a table loader rather than directly. This should also have tests before we can merge it. Thanks for working on this, @hililiwei!
3f29f63 to
2ca5733
Compare
68151c5 to
5cc1907
Compare
d4e671b to
d56f406
Compare
| | 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 | | ||
| | upsert-enabled | Table write.upsert.enabled | Overrides this table's write.upsert.enabled | | ||
| | overwrite | false | Overwrite the table's data | |
There was a problem hiding this comment.
Can we enable both upsert-enabled and overwrite? If not, should we need some doc?
There was a problem hiding this comment.
nit: shall we use overwrite-enabled to keep the name consistent?
There was a problem hiding this comment.
good. done. we cann't enable both upsert-enabled and overwrite
| return confParser.booleanConf() | ||
| .option(FlinkWriteOptions.OVERWRITE_MODE.key()) | ||
| .flinkConfig(FlinkWriteOptions.OVERWRITE_MODE) | ||
| .defaultValue(false) |
There was a problem hiding this comment.
Should we use OVERWRITE_MODE_DEFAULT?
44f3081 to
8739060
Compare
|
@rdblue, Could you please take another look? |
|
|
||
| | Flink option | Default | Description | | ||
| |------------------------| -------------------------- |------------------------------------------------------------------------------------------------------------| | ||
| | write-file-format | Table write.format.default | File format to use for this write operation; parquet, avro, or orc | |
There was a problem hiding this comment.
Can you use the same options that Spark uses? That way people don't have to remember different names.
|
Thanks, @hililiwei! This looks good now. I'll merge. |
|
Thanks all for the reviews. I will port it to all the another versions. |
optimize optimize
Supports overwriting table configuration, such upsert \ overwirte\ file-format, when creating Flink sink.。