Skip to content

Flink: Add Flink SQL procedures for Iceberg similarly to Apache Paimon #16314

@SteveStevenpoor

Description

@SteveStevenpoor

Feature Request / Improvement

Motivation

Apache Flink supports CALL sql statements to call a stored procedure which can perform administrative tasks. I want to implement something similar to Paimon's procedures in Iceberg.

The idea is to make snapshot references easier to manage directly from Flink SQL.

Implemented procedures

  • create_tag
  • delete_tag
  • create_tag_from_timestamp
  • create_branch
  • delete_branch
  • rollback_to
  • rollback_to_timestamp
  • expire_snapshots

We can add more in the future, something like rename_tag or list_snapshots etc.

Example usage

CALL sys.create_tag('tableId', 'tagName', snapshotId, 'timeRetained')

This made branch/tag workflows much more convenient in Flink SQL.

Query engine

Flink

Willingness to contribute

  • I can contribute this improvement/feature independently
  • I would be willing to contribute this improvement/feature with guidance from the Iceberg community
  • I cannot contribute this improvement/feature at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementPR that improves existing functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions