Viewing compaction details - Amazon Lake Formation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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.

    Shows the compaction status tables.
  • 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.

    Shows the compaction history.
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-name iceberg_db \ --table-name iceberg_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-name iceberg_db \ --table-name iceberg_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.