如何获取AWS Athena中特定架构下的所有表详细信息

Hon*_*ney 9 sql hive amazon-athena

我通过以下查询在 Hive 中获取表的详细信息,但在 Athena 中没有找到相应的信息。

use schema_name;
SHOW TABLE EXTENDED LIKE '*'
Run Code Online (Sandbox Code Playgroud)

作为上述查询输出的一部分,我将获取每个表名称的以下属性的值。 表名称、所有者、位置、输入格式、输出格式、分区、分区列、totalFileSize、maxFileSize、minFileSize、lastAccessTime、lastUpdateTime

想要在 Athena 中获得上述所有详细信息,这就是我正在遵循的方法。

SELECT table_name FROM   information_schema.tables WHERE  table_schema = 'logging' // Lists all the tables under logging schema.
DESCRIBE EXTENDED AwsDataCatalog.logging.logtable1; // Getting the details in plain text per table, can parse and some how we can fetch relevant data. Do the same for all other tables under schema.
Run Code Online (Sandbox Code Playgroud)

上述查询的局限性是,我们必须对每个表执行查询,而不是一次性获取所有表的详细信息。

有没有更好的方法来查询和获取所需的信息?