Skip to content

[Iceberg CDC] Add Changelog readers and update resolver#38837

Draft
ahmedabu98 wants to merge 1 commit into
apache:masterfrom
ahmedabu98:iceberg_changelog_readers
Draft

[Iceberg CDC] Add Changelog readers and update resolver#38837
ahmedabu98 wants to merge 1 commit into
apache:masterfrom
ahmedabu98:iceberg_changelog_readers

Conversation

@ahmedabu98
Copy link
Copy Markdown
Contributor

@ahmedabu98 ahmedabu98 commented Jun 5, 2026

Adds read transforms that consume planned Iceberg changelog tasks and turn them into Beam CDC rows.

ReadFromChangelogs reads task batches produced by ChangelogScanner:

  • Unidirectional task batches are read and emitted directly as INSERT or DELETE rows
  • Large bidirectional task batches are read with full rows, filtered by primary-key overlap range, and routed into keyed insert/delete streams for downstream update resolution.
    • Records outside the overlap range are safely emitted directly because they cannot match an opposing change.

LocalResolveDoFn reads and resolves small bidirectional task batches in memory.

CdcResolver centralizes the logic for reconciling deletes and inserts for the same primary key. It emits changed pairs as UPDATE_BEFORE / UPDATE_AFTER, and leaves unmatched rows as DELETE or INSERT. Duplicate no-op pairs with identical non-PK fields are dropped.

Part of #38831


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.

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.

1 participant