Skip to content

[Docs] Document UnboundedSource in the Python I/O connector guide - #39529

Open
Eliaaazzz wants to merge 1 commit into
apache:masterfrom
Eliaaazzz:python-unbounded-source-doc
Open

[Docs] Document UnboundedSource in the Python I/O connector guide#39529
Eliaaazzz wants to merge 1 commit into
apache:masterfrom
Eliaaazzz:python-unbounded-source-doc

Conversation

@Eliaaazzz

@Eliaaazzz Eliaaazzz commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Documents UnboundedSource in the Python I/O connector development guide, mirroring the UnboundedSource coverage in the Java guide.

The guide currently describes only the bounded BoundedSource / RangeTracker path, so the UnboundedSource, UnboundedReader, and CheckpointMark classes added in #38724 are undocumented on the website.

What changes

  • The "Implementing the Source interface" intro now lists UnboundedSource alongside BoundedSource, and names the reader and checkpoint-mark classes each one needs.
  • Implementing the UnboundedSource subclass - split, create_reader, get_checkpoint_mark_coder, the optional default_output_coder, and the absence of a per-record dedup hook (use Deduplicate after the read).
  • Implementing the UnboundedReader subclass - start, advance, get_current, get_current_timestamp, get_watermark, get_checkpoint_mark, close, including the distinction between "no data right now" and a MAX_TIMESTAMP end of stream.
  • Checkpoint marks - how a mark is persisted and replayed into create_reader, and the idempotence requirement on finalize_checkpoint.
  • Reading from an UnboundedSource - an example source over a partitioned message queue, reading it with beam.io.Read, and the poll_interval / max_records_per_bundle / max_read_time_seconds knobs on ReadFromUnboundedSource.

The example was run on the DirectRunner against a fake queue before being added: beam.io.Read(QueueSource(...)) emits the expected records and, thanks to the default_output_coder override, types the output PCollection as bytes.

This replaces the earlier revision of this PR, which described how to write an unbounded Splittable DoFn instead of documenting the UnboundedSource API.


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • 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

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

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @damccorm for label website.

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).

@Eliaaazzz
Eliaaazzz force-pushed the python-unbounded-source-doc branch from 8e5b2cb to f5f2f74 Compare July 31, 2026 12:01
@Eliaaazzz Eliaaazzz changed the title [Docs] Add unbounded source guidance to the Python I/O connector guide [Docs] Document UnboundedSource in the Python I/O connector guide Jul 31, 2026
@Eliaaazzz
Eliaaazzz force-pushed the python-unbounded-source-doc branch from f5f2f74 to 01821a4 Compare July 31, 2026 13:10
The guide covered only the bounded BoundedSource and RangeTracker path.
Add the UnboundedSource, UnboundedReader, and CheckpointMark sections,
plus an example source and the Read and ReadFromUnboundedSource entry
points.

Group the source classes under "Implementing the Source subclass" and
the reader classes under "Implementing the RangeTracker and
UnboundedReader subclasses" so the page nests the same way as the Java
guide.
@Eliaaazzz
Eliaaazzz force-pushed the python-unbounded-source-doc branch from 01821a4 to ff50ad4 Compare July 31, 2026 13:12
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