Skip to content

Expand IcebergIO write API to cover all write options#5986

Open
clairemcginty wants to merge 4 commits into
mainfrom
icebergio-write-api
Open

Expand IcebergIO write API to cover all write options#5986
clairemcginty wants to merge 4 commits into
mainfrom
icebergio-write-api

Conversation

@clairemcginty

Copy link
Copy Markdown
Contributor

Expands iceberg write API to support

  • sort order
  • partition spec
  • arbitrary other options you want to pass to the ManagedIO config map, ie. distribution_mode

@clairemcginty
clairemcginty requested a review from regadas July 24, 2026 16:51
writeProperties: Map[String, String] = IcebergIO.WriteParam.DefaultWriteProperties,
sortFields: List[String] = IcebergIO.WriteParam.DefaultSortFields,
partitionFields: List[String] = IcebergIO.WriteParam.DefaultPartitionFields,
extraConfigProperties: Map[String, AnyRef] = IcebergIO.WriteParam.DefaultExtraConfigProperties,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought this was more flexible than adding a dedicated named param for every new option added to the Iceberg write api (i.e. distribution_mode, autosharing, etc...)

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.

Yeah might be better this way indeed till the API stabilizes

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.99%. Comparing base (3b35141) to head (c1958b1).

Files with missing lines Patch % Lines
...ain/scala/com/spotify/scio/iceberg/IcebergIO.scala 85.71% 1 Missing ⚠️
...scio/iceberg/syntax/IcebergSCollectionSyntax.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5986   +/-   ##
=======================================
  Coverage   61.99%   61.99%           
=======================================
  Files         323      323           
  Lines       11737    11742    +5     
  Branches      793      829   +36     
=======================================
+ Hits         7276     7280    +4     
- Misses       4461     4462    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

withClue(
"Iceberg writeProperties are not supported in Beam versions <= 2.76. Once Beam is upgraded, flip this assertion to `true`."
) {
hasBloom shouldBe false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This won't work until the next Beam release w/ apache/beam#39250 ; I did validate that this test passes when using a locally built Beam snapshot 👍

@clairemcginty
clairemcginty marked this pull request as ready for review July 24, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants