Skip to content

Expand IcebergIO write API to cover all write options - #5986

Merged
clairemcginty merged 9 commits into
mainfrom
icebergio-write-api
Aug 7, 2026
Merged

Expand IcebergIO write API to cover all write options#5986
clairemcginty merged 9 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.98%. Comparing base (3b35141) to head (4e2686c).
⚠️ Report is 4 commits behind head on main.

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.98%   -0.01%     
==========================================
  Files         323      323              
  Lines       11737    11743       +6     
  Branches      793      839      +46     
==========================================
+ Hits         7276     7279       +3     
- Misses       4461     4464       +3     

☔ 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
@clairemcginty
clairemcginty requested a review from shnapz July 27, 2026 18:18
table: String,
catalogName: String = null,
catalogProperties: Map[String, String] = IcebergIO.WriteParam.DefaultCatalogProperties,
hadoopConfigProperties: Map[String, String] =

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.

this is a breaking change. We assume that there are not many affected users? Should we add some doc though?

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.

yeah... not ideal, but AFAIK there are no users of this API. We weren't even publishing the scio-managed artifact until about a month ago, in 0.15.7 😅

@clairemcginty
clairemcginty merged commit 15b5db0 into main Aug 7, 2026
10 of 11 checks passed
@clairemcginty
clairemcginty deleted the icebergio-write-api branch August 7, 2026 19:46
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.

3 participants