---
title: "POST /#X-Amz-Target=AmazonAthena.GetTableMetadata"
method: POST
path: "/#X-Amz-Target=AmazonAthena.GetTableMetadata"
---

# POST /#X-Amz-Target=AmazonAthena.GetTableMetadata

`POST /#X-Amz-Target=AmazonAthena.GetTableMetadata`

Returns table metadata for the specified catalog, database, and table.

## Headers

- `X-Amz-Target` 'AmazonAthena.GetTableMetadata', required

## Request body

- GetTableMetadataInput
  - `CatalogName` string, required — The name of the data catalog that contains the database and table metadata to return.
  - `DatabaseName` string, required — The name of the database that contains the table metadata to return.
  - `TableName` string, required — The name of the table for which metadata is returned.

## Response `200`

Success

- GetTableMetadataOutput
  - `TableMetadata` object — An object that contains table metadata.
    - `Name` string, required — The name of the table.
    - `CreateTime` string, date-time — The time that the table was created.
    - `LastAccessTime` string, date-time — The last time the table was accessed.
    - `TableType` string — The type of table. In Athena, only <code>EXTERNAL_TABLE</code> is supported.
    - `Columns` Column[] — A list of the columns in the table.
      - `Name` string, required — The name of the column.
      - `Type` string — The data type of the column.
      - `Comment` string — Optional information about the column.
    - `PartitionKeys` Column[] — A list of the partition keys in the table.
      - `Name` string, required — The name of the column.
      - `Type` string — The data type of the column.
      - `Comment` string — Optional information about the column.
    - `Parameters` object — A set of custom key/value pairs for table properties.

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException
- `482` — MetadataException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
