All Products
Search
Document Center

Realtime Compute for Apache Flink:Manage draft versions

Last Updated:Mar 09, 2026

Every time you deploy a draft, the system creates a draft version. You can use draft versions to compare changes between iterations, restore a previous version, pin a version to prevent automatic deletion, or delete versions you no longer need.

The system supports a maximum of 50 draft versions. When this limit is exceeded, the earliest version is automatically deleted.

Operations

The Draft Versions panel in the SQL editor supports the following operations:

Operation

Description

Compare draft versions

View a side-by-side diff of SQL code and deployment configurations between two versions. Differences are highlighted.

Roll back a draft version

Restore a deployed draft to a previous version.

Lock a draft version

Pin a version to protect it from automatic deletion.

Delete a draft version

Delete a draft version.

Common steps

Steps 1 through 5 are shared across all operations. Complete these steps first, then follow the operation-specific instructions.

  1. Log on to the Realtime Compute for Apache Flink console.

  2. Find the target workspace and click Console in the Actions column.

  3. In the left-side navigation pane, choose Development > ETL.

  4. Double-click the name of the target draft.

  5. On the right side of the SQL editor, click the Versions tab.

Compare draft versions

You can compare two draft versions side by side. Only SQL code and deployment configurations are included in the comparison, and differences are highlighted.

Procedure

  1. Complete the common steps.

  2. In the Draft Versions panel, find the target version and click Diff in the Actions column.

  3. In the Draft Version dialog box, use the Select Editing Version pane on the left side to select the version to compare against the version you are currently editing. The differences between the two versions are highlighted in the comparison view.

Roll back a draft version

You can roll back a deployed draft to a historical version.

Procedure

  1. Complete the common steps.

  2. In the Draft Versions panel, find the target version and choose More > Restore in the Actions column.

  3. In the Draft Version dialog box, click Restore.

Lock a draft version

When the number of draft versions exceeds 50, the system automatically deletes the earliest version. To protect a version from automatic deletion, you can lock (pin) it.

Procedure

  1. Complete the common steps.

  2. In the Draft Versions panel, find the target version and choose More > Pin in the Actions column.

Result

After you pin a version, a lock icon appears next to the version number, and a confirmation message is displayed at the top of the page. The pinned version is excluded from automatic deletion.

Note

To unlock a pinned version, find it in the Draft Versions panel and choose More > Unpin in the Actions column. You must unlock a version before you can delete it.

Delete a draft version

You can delete draft versions that you no longer need.

Note

To delete a locked version, you must first unlock it by choosing More > Unpin in the Actions column. For more information, see Lock a draft version.

Procedure

  1. Complete the common steps.

  2. In the Draft Versions panel, find the target version and choose More > Delete in the Actions column.

  3. In the Draft Version dialog box, click Delete.