Viewing compaction details
You can view compaction status for Apache Iceberg in the Lake Formation console, Amazon CLI, or using Amazon API operations.
- Console
-
To view compaction status for Iceberg tables (console)
-
You can view compaction status for Iceberg tables on the Lake Formation console by choosing Tables under Data Catalog. The Compaction status field shows the status of the compaction run. You can display table format and compaction status using the table preferences.
-
To view the compaction run history for a specific table, choose Tables under Amazon Glue Data Catalog, and choose a table to view the table details. The Table optimization tab shows the compaction history for the table.
-
- Amazon CLI
-
You can view the compaction details using Amazon CLI.
In the following examples, replace the account ID with a valid Amazon account ID, the database name, and table name with actual Iceberg table name.
-
To get the last compaction run details for a table
aws get-table-optimizer \ --catalog-id
123456789012
\ --database-nameiceberg_db
\ --table-nameiceberg_table
\ --type compaction -
Use the following example to retrieve the history of an optimizer for a specific table.
aws list-table-optimizer-runs \ --catalog-id
123456789012
\ --database-nameiceberg_db
\ --table-nameiceberg_table
\ --type compaction -
The following example shows how to retrieve the compaction run and configuration details for multiple optimizers. You can specify a maximum of 20 optimizers.
aws glue batch-get-table-optimizer \ --entries '[{"catalogId":"
123456789012
", "databaseName":"iceberg_db
", "tableName":"iceberg_table
", "type":"compaction"}]'
-
- Amazon API
-
-
Use
GetTableOptimizer
operation to retrieve the last run details of an optimizer. -
Use
ListTableOptimizerRuns
operation to retrieve history of a given optimizer on a specific table. You can specify 20 optimizers in a single API call. -
Use
BatchGetTableOptimizer
operation to retrieve configuration details for multiple optimizers in your account. This operation doesn't support cross account calls.
-