table_optimizer_runs
Creates, updates, deletes, gets or lists a table_optimizer_runs resource.
Overview
| Name | table_optimizer_runs |
| Type | Resource |
| Id | aws.glue.table_optimizer_runs |
Fields
The following fields are returned by SELECT queries:
- list_table_optimizer_runs
| Name | Datatype | Description |
|---|---|---|
compaction_metrics | object | A CompactionMetrics object containing metrics for the optimizer run. |
compaction_strategy | string | 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. (binpack, sort, z-order) |
end_timestamp | string (date-time) | Represents the epoch timestamp at which the compaction job ended. |
error | string | An error that occured during the optimizer run. |
event_type | string | An event type representing the status of the table optimizer run. (starting, completed, failed, in_progress) |
metrics | object | 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 | object | An OrphanFileDeletionMetrics object containing metrics for the optimizer run. |
retention_metrics | object | A RetentionMetrics object containing metrics for the optimizer run. |
start_timestamp | string (date-time) | Represents the epoch timestamp at which the compaction job was started within Lake Formation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_table_optimizer_runs | select | region | Lists the history of previous optimizer runs for a specific table. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_table_optimizer_runs
Lists the history of previous optimizer runs for a specific table.
SELECT
compaction_metrics,
compaction_strategy,
end_timestamp,
error,
event_type,
metrics,
orphan_file_deletion_metrics,
retention_metrics,
start_timestamp
FROM aws.glue.table_optimizer_runs
WHERE region = '{{ region }}' -- required
;