Skip to content

Managed Iceberg AddFiles - #40827

Merged
ahmedabu98 merged 4 commits into
apache:masterfrom
ahmedabu98:managed-addfiles
Oct 27, 2026
Merged

ahmedabu98 merged 4 commits into
apache:masterfrom
ahmedabu98:managed-addfiles

Conversation

@ahmedabu98

Copy link
Copy Markdown
Contributor

Making Iceberg AddFiles into a Managed transform to take advantage of automatic upgrades

Changing the URN to the standardized format: beam:schematransform:org.apache.beam:iceberg_add_files:v1
Shouldn't result in any breaking changes

@github-actions github-actions Bot added python java model io core yaml iceberg Iceberg IO connector size/m M: 50-249 lines changed labels Oct 26, 2026

@github-actions github-actions Bot 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.

📋 Review Summary

This PR exposes IcebergAddFiles (beam:schematransform:org.apache.beam:iceberg_add_files:v1) as a Managed IO sink (ICEBERG_ADD_FILES) in both the Java and Python SDKs, standardizes its SchemaTransform URN in external_transforms.proto, and adds SchemaTransformPayloadTranslator support along with unit tests.

🔍 General Feedback

  • The changes cleanly follow the established patterns for Managed IO transforms across proto definitions, Java/Python Managed APIs, IcebergSchemaTransformTranslation, Beam YAML standard_io.yaml, and expansion service configuration.
  • Unit tests in IcebergSchemaTransformTranslationTest thoroughly cover row reconstruction and proto translation for AddFilesSchemaTransformProvider.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.91%. Comparing base (2213e54) to head (d166b29).
⚠️ Report is 43 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #40827       +/-   ##
===========================================
+ Coverage        0   79.91%   +79.91%     
===========================================
  Files           0      493      +493     
  Lines           0    83480    +83480     
===========================================
+ Hits            0    66714    +66714     
- Misses          0    16766    +16766     
Flag Coverage Δ
python 79.91% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @derrickaw for label yaml.
Backup reviewer: chamikaramj (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@chamikaramj chamikaramj 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.

Thanks.

Can we also update AddFiles java documentation and may be examples to use the Managed version ?

* paths.apply(new AddFiles(catalog, "db.sales", null, null, null, null, null, null, evolution));

https://github.com/apache/beam/blob/master/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/AddFilesIT.java

type: beamJar
transforms:
'IcebergAddFiles': 'beam:schematransform:iceberg_add_files:v1'
'IcebergAddFiles': 'beam:schematransform:org.apache.beam:iceberg_add_files:v1'

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.

I think to actually use managed here you have to do one of the following.

(1) Add this to YAML I/O and use managed.py there:

return beam.managed.Read(

(2) Use the managed_replacement feature similar to Kafka:

Latter might be easier.

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.

Sounds good, went with the managed_replacement

@derrickaw
derrickaw removed their request for review October 27, 2026 03:02

@chamikaramj chamikaramj 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.

Thanks!

@ahmedabu98
ahmedabu98 merged commit aea4522 into apache:master Oct 27, 2026
105 of 106 checks passed
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