How can I check the partition list from Athena in AWS?


I want to check the partition lists in Athena.

I used query like this.

But I want to search specific table existed.

So I used query like below but there was no results returned.

Because dt contains hour data also.

So is there any way to search when I input ‘2010-03-03’ then it search ‘2010-03-03-01’, ‘2010-03-03-02’?

Do I have to separate partition like this?

And show partitions table_name returned only 500 rows in Hive. Is the same in Athena also?


In Athena v2:

Use this SQL:

(see the official aws docs)

In Athena v1:

There is a way to return the partition list as a resultset, so this can be filtered using LIKE. But you need to use the internal information_schema database like this:

Leave a Reply