Skip to content

[FTAB-214] Update the lifecycle example to use new StatementHandle and statement lifecycle methods - #25

Open
Mika Naylor (autophagy) wants to merge 1 commit into
masterfrom
FTAB-214
Open

Mika Naylor (autophagy) wants to merge 1 commit into
masterfrom
FTAB-214

Conversation

@autophagy

Copy link
Copy Markdown
Member

This PR does several things:

  • Bumps the confluent pyflink version to 2.3.3 (and adds back in the with_all_columns expression removed in the migration over).
  • Standardises on using StatementHandle statement lifecycle methods over using the ConfluentTools statement lifecycle methods.
  • Extends the lifecycle example to use StatementHandle, as well adding argument parsing and lifecycle operations so users can uv run examples/example_08_integration_and_deployment.py [stop/resume/delete] vendors-per-brand-... statements. Also adds a section for inspecting the statement warnings.

Also tried to use fstrings around rather than the % string formatting for better legibility

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.

🟡 Changes recommended

The dependency pin and lifecycle API issues must be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates lifecycle examples and documentation for StatementHandle, adds statement management commands and warning inspection, and bumps confluent-pyflink to 2.3.3.

Changes:

  • Adds stop, resume, and delete CLI operations.
  • Restores with_all_columns() usage.
  • Documents statement lifecycle APIs and warnings.
File summaries
File Summary Final review comments
README.md Documents StatementHandle usage. Nit (1 vote): Inspect warnings before deleting the statement.
pyproject.toml Raises the PyFlink dependency version. Critical (3 votes): Update requirements.txt from 2.3.2 to 2.3.3.
examples/example_08_integration_and_deployment.py Adds CLI lifecycle management and warning inspection. Moderate (2 votes): Use StatementHandle.stop() instead of ConfluentTools.stop_statement.
examples/example_03_transforming_tables.py Restores with_all_columns() usage. No final review comments.
Review details

Suppressed comments (1)

README.md:482

  • The example deletes this statement immediately before calling get_warnings() on the same handle. Since warning inspection is a statement API lookup, deleting the statement can make this request fail (or return no warnings); show the warnings before delete(), or use a separate live statement handle for this example.
for warning in handle.get_warnings():
    print(warning.severity.value, warning.reason, warning.message)
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
Comment thread examples/example_08_integration_and_deployment.py
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.

2 participants