Skip to content

(IcebergIO) Support PartitionSpec/SortOrder on dynamic table creation via IcebergIO - #39408

Merged
ahmedabu98 merged 2 commits into
apache:masterfrom
clairemcginty:iceberg-io-set-create-table-config
Jul 27, 2026
Merged

(IcebergIO) Support PartitionSpec/SortOrder on dynamic table creation via IcebergIO#39408
ahmedabu98 merged 2 commits into
apache:masterfrom
clairemcginty:iceberg-io-set-create-table-config

Conversation

@clairemcginty

Copy link
Copy Markdown
Contributor

#38269 added SortOrder support to Iceberg writes via Managed IO, but it's not accessible through IcebergIO directly. This PR adds support for setting SortOrder+PartitionSpec through the IcebergIO.writeRows builder.

It does make serialization of the transform more complex which might be antithetical to the goal of keeping new transforms as portable as possible -- cc @ahmedabu98, let me know if not exposing these params via IcebergIO was by design and if I should just switch to ManagedIO if I need to specify.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@ahmedabu98 ahmedabu98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry was OOO for some time and just seeing this now. I think this PR is a good addition, and doesn’t harm the portable case at all. Just had one nit regarding naming but it LGTM! Feel free to convert it so we can run some tests against it

Also I’m curious to know if the ManagedIO route is causing any friction for your use case?

Comment thread sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergIO.java Outdated
@clairemcginty
clairemcginty marked this pull request as ready for review July 27, 2026 18:37
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@clairemcginty

Copy link
Copy Markdown
Contributor Author

Sorry was OOO for some time and just seeing this now. I think this PR is a good addition, and doesn’t harm the portable case at all. Just had one nit regarding naming but it LGTM! Feel free to convert it so we can run some tests against it

Also I’m curious to know if the ManagedIO route is causing any friction for your use case?

sounds good! Just renamed the method and undrafted the PR.

No, so far so good! The iceberg write API in Scio goes through ManagedIO and works well. I've just been parity testing a lot of iceberg IO features on both managedIO + icebergIO and caught this particular discrepancy!

@ahmedabu98
ahmedabu98 merged commit 70a5223 into apache:master Jul 27, 2026
20 checks passed
@clairemcginty
clairemcginty deleted the iceberg-io-set-create-table-config branch July 27, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants