You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "amogh-jahagirdar (via GitHub)" <gi...@apache.org> on 2023/01/25 16:01:48 UTC

[GitHub] [iceberg] amogh-jahagirdar commented on pull request #6660: Flink: Support writes to branches

amogh-jahagirdar commented on PR #6660:
URL: https://github.com/apache/iceberg/pull/6660#issuecomment-1403846236

   moving this out of draft. 
   
   Beyond the code wanted to discuss high level API design for branch writes using FlinkSink. In the current implementation we're using a FlinkWriteOption so it looks like this:
   
   ```
   FlinkSink sink = FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
       .table(table)
       .tableLoader(tableLoader)
       .set("write-format", "avro")
        .set(FlinkWriteOptions.BRANCH, "some-branch")
       .set(FlinkWriteOptions.OVERWRITE_MODE, "true")
   ```
   
   As I implemented this though started to think we may just want to have a direct branch method on the FlinkSink builder itself. That seems more intuitive from an API perspective and is just easier to use
   
   ```
   FlinkSink sink = FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
       .table(table)
       .tableLoader(tableLoader)
       .branch("some-branch")
       .set("write-format", "avro")
       .set(FlinkWriteOptions.OVERWRITE_MODE, "true")
   ```
   
   @stevenzwu @yyanyy @rdblue @jackye1995 Let me know your thoughts here! 
   


-- 
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