lakehouse.databricks.common.optimize_table
- lakehouse.databricks.common.optimize_table(spark, delta_db, delta_table)
A function to optimize a delta table
Parameters
- sparkspark context
spark context passed from the calling spark instance
- delta_dbstring
The name of the delta db where the table exists
- delta_tablestring
The name of the table to be optimized
Returns
- In the case of an Exception a JSON object describing the error is returned
{"error-message": f"error optimizing table {delta_db}.{delta_table}- {Exception}"}