Skip to content

TableOptimizerRun

Source code in docs_src/capo_glue/types/table_optimizer_run.py
class TableOptimizerRun(TypedDict, closed=True):
    event_type: NotRequired[
        "capo_glue.types.table_optimizer_event_type.TableOptimizerEventType"
    ]
    """<p>An event type representing the status of the table optimizer run.</p>"""
    start_timestamp: NotRequired[
        "capo_glue.types.table_optimizer_run_timestamp.TableOptimizerRunTimestamp"
    ]
    """<p>Represents the epoch timestamp at which the compaction job was started within Lake Formation.</p>"""
    end_timestamp: NotRequired[
        "capo_glue.types.table_optimizer_run_timestamp.TableOptimizerRunTimestamp"
    ]
    """<p>Represents the epoch timestamp at which the compaction job ended.</p>"""
    metrics: NotRequired["capo_glue.types.run_metrics.RunMetrics"]
    """<p>A <code>RunMetrics</code> object containing metrics for the optimizer run.</p> <p>This member is deprecated. See the individual metric members for compaction, retention, and orphan file deletion.</p>"""
    error: NotRequired["capo_glue.types.message_string.MessageString"]
    """<p>An error that occured during the optimizer run.</p>"""
    compaction_metrics: NotRequired[
        "capo_glue.types.compaction_metrics.CompactionMetrics"
    ]
    """<p>A <code>CompactionMetrics</code> object containing metrics for the optimizer run.</p>"""
    compaction_strategy: NotRequired[
        "capo_glue.types.compaction_strategy.CompactionStrategy"
    ]
    """<p>The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:</p> <ul> <li> <p> <code>binpack</code>: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases. </p> </li> <li> <p> <code>sort</code>: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the <code>sort_order</code> table property.</p> </li> <li> <p> <code>z-order</code>: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the <code>sort_order</code> table property. </p> </li> </ul>"""
    retention_metrics: NotRequired["capo_glue.types.retention_metrics.RetentionMetrics"]
    """<p>A <code>RetentionMetrics</code> object containing metrics for the optimizer run.</p>"""
    orphan_file_deletion_metrics: NotRequired[
        "capo_glue.types.orphan_file_deletion_metrics.OrphanFileDeletionMetrics"
    ]
    """<p>An <code>OrphanFileDeletionMetrics</code> object containing metrics for the optimizer run.</p>"""

compaction_metrics instance-attribute

compaction_metrics: NotRequired[CompactionMetrics]

A CompactionMetrics object containing metrics for the optimizer run.

compaction_strategy instance-attribute

compaction_strategy: NotRequired[CompactionStrategy]

The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:

  • binpack: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases.

  • sort: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

  • z-order: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

end_timestamp instance-attribute

end_timestamp: NotRequired[TableOptimizerRunTimestamp]

Represents the epoch timestamp at which the compaction job ended.

error instance-attribute

error: NotRequired[MessageString]

An error that occured during the optimizer run.

event_type instance-attribute

event_type: NotRequired[TableOptimizerEventType]

An event type representing the status of the table optimizer run.

metrics instance-attribute

metrics: NotRequired[RunMetrics]

A RunMetrics object containing metrics for the optimizer run.

This member is deprecated. See the individual metric members for compaction, retention, and orphan file deletion.

orphan_file_deletion_metrics instance-attribute

orphan_file_deletion_metrics: NotRequired[OrphanFileDeletionMetrics]

An OrphanFileDeletionMetrics object containing metrics for the optimizer run.

retention_metrics instance-attribute

retention_metrics: NotRequired[RetentionMetrics]

A RetentionMetrics object containing metrics for the optimizer run.

start_timestamp instance-attribute

start_timestamp: NotRequired[TableOptimizerRunTimestamp]

Represents the epoch timestamp at which the compaction job was started within Lake Formation.