lakehouse.databricks.common.do_vacuum_and_optimize
- lakehouse.databricks.common.do_vacuum_and_optimize(spark, delta_db, delta_table, retention_period=None) bool
A function to Check to see if Table has enough version or is old enough to optimize and vacuum
Parameters
- sparkspark context
spark context passed from the calling spark instance
- delta_dbstring
The name of the delta db where the table exists
- delta_table: string
The name of the delta db where the table exists
- retention_period: int, in hours, default=None
The number of hours you would like to retain 7 days is 168 Hours; if no value added the default retention will be used, Databricks default is 7 days
Returns
- bool:
whether to vacuum and optimize table