Querying Iceberg table metadata - Amazon Athena
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).

Querying Iceberg table metadata

In a SELECT query, you can use the following properties after table_nameto query Iceberg table metadata:

  • $files – Shows a table's current data files.

  • $manifests – Shows a table's current file manifests.

  • $history – Shows a table's history.

  • $partitions – Shows a table's current partitions.

  • $snapshots – Shows a table's snapshots.

  • $refs – Shows a table's references.

Syntax

The following statement lists the files for an Iceberg table.

SELECT * FROM "dbname"."tablename$files"

The following statement lists the manifests for an Iceberg table.

SELECT * FROM "dbname"."tablename$manifests"

The following statement shows the history for an Iceberg table.

SELECT * FROM "dbname"."tablename$history"

The following example shows the partitions for an Iceberg table.

SELECT * FROM "dbname"."tablename$partitions"

The following example lists the snapshots for an Iceberg table.

SELECT * FROM "dbname"."tablename$snapshots"

The following example shows the references for an Iceberg table.

SELECT * FROM "dbname"."tablename$refs"