[python] Add paimon tail CLI for streaming table reads#7344
Draft
tub wants to merge 3 commits intoapache:masterfrom
Draft
[python] Add paimon tail CLI for streaming table reads#7344tub wants to merge 3 commits intoapache:masterfrom
tub wants to merge 3 commits intoapache:masterfrom
Conversation
…sharding Add foundational infrastructure for pure-Python streaming reads: - Follow-up scanners (delta, changelog, incremental diff) for continuous snapshot polling - Consumer manager for persisting read progress - LRU caching for snapshots, manifests, and manifest lists - Batch existence checks for efficient file IO - Bucket-based sharding for parallel consumption - Row kind support in table reads - Streaming-related core options - Backtick support for identifier parsing Includes unit tests for all new components.
…ation Add core streaming read API: - StreamReadBuilder for configuring streaming reads with predicates, projections, consumer IDs, sharding, and poll intervals - AsyncStreamingTableScan with async generator and sync wrapper for continuous snapshot polling - Table interface additions: new_stream_read_builder() on Table, FileStoreTable, FormatTable (stub), IcebergTable (stub) - Minor fix in split_read.py - Add oss/lance extras to setup.py - Streaming reads documentation and supported features list Includes streaming table scan and sharding unit tests.
Add command-line interface for streaming Paimon table data: - paimon tail command: stream data from tables similar to kafka-console-consumer, with support for multiple output formats (jsonl, json, csv, table), filtering, column projection, consumer IDs, flexible start position (earliest, latest, snapshot:ID, time:-1h), and --to end position - CLI utilities for time parsing and output formatting - console_scripts entry point in setup.py - CLI documentation and supported features list Includes CLI utility tests.
8988eee to
4e4c2a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is an optional addition to the python streaming feature - I just found it useful for debugging data issues locally without having to run Flink or Spark.
PR 3 of 3 for pure-Python streaming reads. This PR adds the
paimon tailCLI command:paimon tail: stream data from Paimon tables, similar tokafka-console-consumerearliest,latest,snapshot:ID,time:-1h--toend position for bounded reads--followfor continuous streamingconsole_scriptsentry point in setup.py7 files changed, +1396 lines (incremental)
PR Stack
paimon tailcommand)Incremental diff (just this PR's changes): python-streaming-2-core...tub:paimon:python-streaming-3-cli
Merge workflow: Merge PR 1, rebase PR 2 onto updated master (PR 1 commits drop out), merge PR 2, repeat for PR 3.
Test plan
python -m pytest pypaimon/tests— 630 passed (9 pre-existing lance failures)python -c "from pypaimon import CatalogFactory"— no import errors🤖 Generated with Claude Code