Skip to main content

ROLLBACK TABLE

Roll back an Iceberg table to a previous snapshot using either a timestamp or a snapshot ID. For more information about rolling back tables, see Rolling Back Tables.

Syntax
ROLLBACK TABLE <table_name> 
TO { [ SNAPSHOT '<snapshot_id>' ] | [ TIMESTAMP '<timestamp>' ] }

Parameters

{{< sql-section file="data/sql/rollback.json" data="rollingBackATable" >}}

Examples

Roll back the table to the specified snapshot ID
ROLLBACK TABLE demo.example_table TO SNAPSHOT2489484212521283189
Roll back the table based on the specified timestamp
ROLLBACK TABLE demo.example_table TO TIMESTAMP2022-06-22 17:06:00