Skip to content

[python] Add list-files & file command support for Python CLI. - #11154

Open
fengruotj wants to merge 1 commit into
apache:masterfrom
fengruotj:feat/pypaimon-cli-file
Open

fengruotj wants to merge 1 commit into
apache:masterfrom
fengruotj:feat/pypaimon-cli-file

Conversation

@fengruotj

Copy link
Copy Markdown
Contributor

Purpose

Implements the file commands proposed in #11073 (https://github.com/apache/paimon/issues/11073).

Adds read-only file inspection to the PyPaimon CLI:

  • paimon table list-files <database.table> lists live data files referenced by the latest or a specified snapshot, including the snapshot ID and file metadata. It supports --snapshot-id, --bucket, and --limit, with table output by default or JSON output.
  • paimon table file <database.table> --file reads a Parquet file at a path or filesystem URI and displays its schema and footer metadata, including row groups and column statistics. It supports JSON output by default or table output, with schema and metadata displayed as indented, multiline JSON.

These commands inspect metadata without scanning data records or modifying the table. The file command does not query snapshots or manifests. CLI documentation and output examples are included.

Also renames table rollback --snapshot to --snapshot-id for consistency with the other table commands.

Tests

  • paimon-python/pypaimon/tests/cli_table_test.py: 90 passed, including file inspection regression tests.
  • flake8 for the changed Python files: passed.

@fengruotj fengruotj changed the title [python] Add list-files & file by file support for Python CLI. [python] Add list-files & file command support for Python CLI. Nov 14, 2026
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.

1 participant