adp.delivery.rollback.rollback_table
- adp.delivery.rollback.rollback_table(database: str, schema: str, table: str, rollback_datetime: datetime, dry_run: bool = True) None
- adp.delivery.rollback.rollback_table(path: str, rollback_datetime: datetime, dry_run: bool = True) None
rollback_table restores a table to a previous state.
Warning
The rollback_datetime will be interpreted according to the ‘spark.sql.session.timeZone’ setting
- Parameters:
database (str, optional) – The database of the table. Defaults to None.
schema (str, optional) – The schema of the table. Defaults to None.
table (str, optional) – The name of the table. Defaults to None.
rollback_datetime (datetime, optional) – The date to restore to. Defaults to None.
path (str, optional) – The path to the table. Defaults to None.
dry_run (bool, optional) – If true, no tables will be restored. Defaults to False.
Examples
>>> rollback_table(database='db', schema='schema', table='table', rollback_datetime=datetime.now()) >>> rollback_table(path='path', rollback_datetime=datetime.now())