Procedures
Run procedures through the sys namespace of a Paimon catalog, with
PaimonSparkSessionExtensions enabled as in Quick Start.
-- Select a Paimon catalog, then use its sys namespace.
USE paimon.default;
CALL sys.compact(table => 'default.T');
-- Or qualify the catalog explicitly.
CALL paimon.sys.compact(table => 'default.T');
Examples below assume the named tables already exist. Named arguments (name => value) make
optional parameters explicit; identifiers passed as arguments are SQL string literals.
Parameter types and required/optional labels below follow the procedure signatures. An optional
argument can still be required by a particular mode or combination; those constraints are
listed in its description. Examples under one procedure are alternative calls, not a script to
run in sequence.
Find a Procedure
Choose a group, then use the page contents to jump to a procedure:
| Group | Operations |
|---|---|
| Compaction and cleanup | Compact files and manifests, rescale buckets, expire history, and repair metadata. |
| Tags, branches, and rollback | Create and manage versions, merge branches, or restore table state. |
| Migration and copy | Migrate Hive tables or copy Paimon files. |
| Indexes and row IDs | Build or drop indexes and reassign row IDs. |
| Consumers, views, and functions | Manage reader progress, partition completion, and catalog objects. |
Procedure Index
Compaction and Cleanup
compact,
compact_database,
compact_chain_table,
compact_manifest,
materialize_deletion_vectors,
rescale,
expire_snapshots,
expire_changelogs,
expire_partitions,
remove_orphan_files,
remove_orphan_blobs,
remove_unexisting_files,
remove_unexisting_manifests,
purge_files,
repair,
repair_earliest_snapshot
Tags, Branches, and Rollback
create_tag,
create_tag_from_timestamp,
replace_tag,
rename_tag,
delete_tag,
expire_tags,
trigger_tag_automatic_creation,
create_branch,
delete_branch,
rename_branch,
fast_forward,
merge_branch,
rollback,
rollback_to_as_latest,
rollback_to_timestamp,
rollback_to_watermark
Migration and Copy
migrate_database,
migrate_table,
copy
Indexes and Row IDs
rewrite_file_index,
create_global_index,
drop_global_index,
reassign_row_id
Consumers, Views, and Functions
reset_consumer,
clear_consumers,
mark_partition_done,
alter_view_dialect,
create_function,
alter_function,
drop_function
Permissions and Policies
REST catalog access management is documented with its resource scopes and parameter contracts:
| Procedure | Reference |
|---|---|
grant_permission | Grant permissions |
revoke_permission | Revoke permissions |
list_permissions | List permissions |
create_policy | Row filters and column masks |
drop_policy | Drop policies |
list_policies | List policies |