paimon icon indicating copy to clipboard operation
paimon copied to clipboard

[Flink]Add flink action for creating and deleting branch

Open herefree opened this issue 1 year ago • 5 comments

Purpose

subtask of https://github.com/apache/incubator-paimon/issues/1795

Tests

org.apache.paimon.flink.action.BranchActionITCase#testCreateAndDeleteBranch

API and Format

Documentation

Delete Branch

You can delete a branch by its name.

Run the following command:

<FLINK_HOME>/bin/flink run \
    /path/to/paimon-flink-action.jar \
    delete_branch \
    --warehouse <warehouse-path> \
    --database <database-name> \ 
    --table <table-name> \
    --branch_name <branch-name> \
    [--catalog_conf <paimon-catalog-conf> [--catalog_conf <paimon-catalog-conf> ...]]

Create Branch

You can create a branch with given name and tag name. Run the following command:

<FLINK_HOME>/bin/flink run \
    /path/to/paimon-flink-action.jar \
    create_branch \
    --warehouse <warehouse-path> \
    --database <database-name> \ 
    --table <table-name> \
    --branch_name <branch-name> \
    --tag_name <tag-name> \
    [--catalog_conf <paimon-catalog-conf> [--catalog_conf <paimon-catalog-conf> ...]]

herefree avatar Feb 16 '24 10:02 herefree

@TaoZex @FangYongs @schnappi17 help review thanks~

herefree avatar Feb 16 '24 10:02 herefree

Please add the corresponding content in the doc.

TaoZex avatar Feb 20 '24 08:02 TaoZex

Please add the corresponding content in the doc.

Which document should I write in? Currently, I have not found any document that introduces branches.

herefree avatar Feb 20 '24 08:02 herefree

@TaoZex I added some comments above, do you think this is okay?

herefree avatar Feb 20 '24 09:02 herefree

@herefree We can create a doc to guide Manage Branches, you can see Manage Tags.

schnappi17 avatar Mar 07 '24 12:03 schnappi17