Skip to main content
ReferenceApplies to: Unified engine deployments
CALL submits one table maintenance operation. The target catalog and connector must support its action. The current native Iceberg provider supports data compaction, positional-delete compaction, and manifest optimization on format-v2 tables.

Procedure names and target resolution

Accepted name forms are:
Without a catalog qualifier, the target table name is resolved using the session’s catalog and namespace. With a procedure catalog qualifier, the table must resolve to that same catalog. Use an explicit namespace and table name to make the target clear. Use either named arguments or positional arguments in one call. Do not mix them. Named arguments make maintenance settings easier to review. The examples below reuse the private tables created by the recipes.

Data compaction

Aliases: compact_data, rewrite_data_files.
Direct named options and the options => map(...) form feed the same settings. Hyphenated option keys are normalized to underscores. max_file_group_size_bytes is an alias for max_group_size_bytes. Repeating the same setting through both forms is rejected. Sizes and file counts must be positive. The target file size cannot exceed the requested group size. Runtime input, output, and decoded-memory limits also apply. where filtering is not supported by this implementation. Sort expressions accept column paths, direction, and null order, such as region ASC NULLS LAST, id DESC NULLS FIRST. Z-order also accepts strategy => 'sort', sort_order => 'zorder(id, amount)'. The explicit strategy => 'zorder', columns => array('id', 'amount') form is often clearer. Result columns: rewritten_data_files_count, added_data_files_count, rewritten_bytes_count.

Positional-delete compaction

Aliases: compact_deletes, rewrite_position_delete_files.
Result columns: rewritten_delete_files_count, added_delete_files_count, rewritten_bytes_count. This action compacts positional-delete files; it does not expire snapshots or physically purge all old row data.

Manifest optimization

Aliases: optimize_metadata, rewrite_manifests.
Result columns: rewritten_manifests_count, added_manifests_count. rewrite_manifests is an alias for the same action. Named options can supply the metadata target with either name.

Recognized but unsupported by native Iceberg

These names are parsed into maintenance actions, but the current provider rejects those actions. They are not runnable cleanup or retention recipes. A dry-run argument does not enable an unsupported action.

Completion, no-ops, and retries

Wait for the operation’s successful completion and confirmed publication. Prepared files or intermediate counters alone are not proof that a new table state is visible. Read the table again after completion. A no-op can succeed when no files qualify. Check counters and the actual table rather than assuming every call must rewrite files. For a lost response, retry the original operation with its original identity. A fresh CALL is a new operation against the table state resolved for that request. Review any concurrent table changes before starting a replacement operation. Instance defaults and limits are described in maintenance configuration. Saved properties for future writes are described in TBLPROPERTIES.
Last modified on November 4, 2026