Sinan Erdem
Sinan Erdem

Reputation: 1124

How to query data about Amazon Athena itself?

Are there any internal tables that we can query inside Athena that will give us info about the usage of Athena?

I am looking for data like:

I know there are hidden fields like $path, but I wonder if there are hidden tables about metadata?

Upvotes: 1

Views: 498

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270114

No. Amazon Athena is not like a traditional database.

Instead, this information is accessible via AWS AP requests, eg:

However, the query execution details does not show which user executed the query. Instead, you can obtain such information from AWS CloudTrail, which keeps track of API calls made to almost every AWS service (not just Athena). The CloudTrail record will include the queryExecutionId, which can be used in get-query-execution (above) to retrieve details of the query.

Upvotes: 2

Related Questions