Updated on 2024-11-29 GMT+08:00

Savepoint

Introduction to Savepoint

Savepoints are used to save and restore custom version data.

Savepoints provided by Hudi can save different commits so that the cleanup program does not delete them. You can use the rollback function to restore them later.

Using Savepoint

Use spark-sql to manage savepoints.

Example:

  • Creating a savepoint
    call create_savepoints('hudi_test1', '20220908155421949');
  • Viewing all existing savepoints
    call show_savepoints(table =>'hudi_test1');
  • Rolling back a savepoint
    call rollback_savepoints('hudi_test1', '20220908155421949');

The savepoint rollback command is the same as the commit rollback commands. Both must be rolled back from the latest instant one by one.