Skip to content

Add an example for the lifecyle of stateful PTF#46

Merged
Timo Walther (twalthr) merged 1 commit into
masterfrom
statefulPtfExample
Jul 20, 2026
Merged

Add an example for the lifecyle of stateful PTF#46
Timo Walther (twalthr) merged 1 commit into
masterfrom
statefulPtfExample

Conversation

@twalthr

Copy link
Copy Markdown
Member

An example going deeper on the stateful part of ProcessTableFunctions.

Copilot AI review requested due to automatic review settings July 20, 2026 07:45
@twalthr
Timo Walther (twalthr) requested review from a team as code owners July 20, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Table API example that demonstrates the state lifecycle of a stateful ProcessTableFunction (PTF) running on Confluent Cloud, specifically showing that keyed state is snapshotted on stop and restored on resume.

Changes:

  • Introduces Example_12_StatefulProcessTableFunction, creating a managed source/sink table pair and running a keyed, stateful PTF that maintains a running per-name sum.
  • Demonstrates statement lifecycle operations (stop, resume, delete) and uses collectChangelog before/after stop/resume to observe state persistence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@twalthr
Timo Walther (twalthr) merged commit 9e82b02 into master Jul 20, 2026
2 checks passed
@twalthr
Timo Walther (twalthr) deleted the statefulPtfExample branch July 20, 2026 15:11
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.

4 participants