[python] Introduce table import, drop and alter to Python CLI#7360
Merged
JingsongLi merged 4 commits intoapache:masterfrom Mar 8, 2026
Merged
[python] Introduce table import, drop and alter to Python CLI#7360JingsongLi merged 4 commits intoapache:masterfrom
JingsongLi merged 4 commits intoapache:masterfrom
Conversation
|
|
||
| # Commit write | ||
| table_commit.commit(table_write.prepare_commit()) | ||
| table_write.close() |
Member
There was a problem hiding this comment.
It's better to close table_write and table_commit in a finally block to ensure resources are always released.
| help='Table identifier in format: database.table' | ||
| ) | ||
| alter_parser.add_argument( | ||
| '--ignore-if-not-exists', |
Member
There was a problem hiding this comment.
--ignore-if-not-exists for table alter doesn't have a -i short option, any particular reason for this?
Contributor
Author
There was a problem hiding this comment.
Fixed, just because I changed the AI model to claude-4.6.
Member
|
+1 |
jerry-024
added a commit
to jerry-024/paimon
that referenced
this pull request
Mar 10, 2026
* upstream/master: (31 commits) [python] Correct pyroaring version in requirements [test] Enrich table name in MergeIntoTableTestBase [test] Fix unstable test: FileStoreLookupFunctionTest.testLookupScanLeak [python] Remove useless parameters in blob_writer.py [rest] Introduce reset consumer api in rest (apache#7372) [python] Introduce Python CLI table snapshot (apache#7373) [python] Fix time mapping by always using time32 (apache#7371) [python] Introduce catalog list-dbs in Python CLI (apache#7366) [hotfix][docs] replace the documentation URL for data-types blob (apache#7370) [python] Add i short name to ignore-if-not-exists for database [python] Support dynamic bucket write (apache#7363) [python] Introduce database related commands to Python CLI (apache#7362) [python] Introduce table import, drop and alter to Python CLI (apache#7360) [python] Fix py version required in README (apache#7361) [test] Add missing LeafFunction coverage in PredicateJsonSerdeTest (apache#7359) [python] support predicate NotBetween, Like function (apache#7352) [python] Introduce Paimon CLI in PyPaimon (apache#7358) [doc] Document ignoreIfExists for create_branch [core] Add IF NOT EXISTS support for create_branch operation (apache#7353) [python] Remove oss and pylance from requirements deps ...
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.
Purpose
This PR extends the PyPaimon CLI with three new table sub-commands: import, drop, and alter, significantly expanding the CLI's data management capabilities beyond the existing read, get, and create commands.
table import — Bulk-load data from CSV or JSON files into an existing Paimon table. Reads the file into a pandas DataFrame, converts it to a PyArrow Table matching the target schema, and writes it using the batch write API.
table drop — Drop a table from the catalog with an optional --ignore-if-not-exists (-i) flag. Implemented in both FileSystemCatalog (deletes the table directory) and the abstract Catalog interface.
table alter — A rich set of schema alteration sub-commands:
Tests
API and Format
Documentation
Generative AI tooling
Claude-4.6