Updated on 2026-06-27 GMT+08:00

Hudi Savepoint

Scenarios

A savepoint creates a snapshot during data processing, allowing you to restore specific data versions when needed.

Savepoints are used for:

  • Data restoration: Use a savepoint to quickly restore data to a point in time if an error occurs or a rollback is required.
  • Version management: Use savepoints to manage different data versions, facilitating version comparison and rollbacks.
  • Backup: Create regular savepoints to provide a reliable data backup method, ensuring data security.

Hudi savepoints preserve specific commits to prevent the cleaner from deleting them, allowing you to roll back and restore that data later.

Managing Savepoints

Use Spark SQL to manage savepoints. For details, see SAVE_POINT.

Example:

  • Create a savepoint.
    call create_savepoint('hudi_test1', '20220908155421949');
  • View all existing savepoints.
    call show_savepoints(table =>'hudi_test1');
  • Roll back a savepoint.
    call rollback_to_savepoint('hudi_test1', '20220908155421949');
  • The savepoint rollback command functions identically to commit rollback. Both must be executed sequentially, rolling back from the most recent instant.
  • MRS 3.1.2: MOR tables do not support savepoints.