LoginSignup
1
0

More than 3 years have passed since last update.

AthenaにてShow partitionsが失敗する

Last updated at Posted at 2020-07-05

現象

AWS Athenaにて特定テーブルのパーティションが多い場合、Show Partitionsにて、
パーティションの一覧を取得しようとすると、internal errorで失敗することがあります。

SHOW PARTITIONS {database}.{table_name}

Your query has the following error(s):

[ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena an experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.
This query ran against the "xxx" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: xxxxxxxx-50d3-4699-ae41-XXXXXXXXXXXX.

テーブルのパーティションの数が多い場合に発生することがあるようです。
このテーブルに対して、MSCK REPAIR TABLEを実行しても同じくエラーとなります。

AWSサポートに問い合わせたところ、AWS側の不具合との回答でした。(2020/07/02時点)

回避策

回避策としては、GlueのDataCatalogと統合されている場合には、
Glue側でパーティションの一覧を取得することができます。

Glueと統合されているケースは、基本Glue側のAPIを使用して、パーティションの更新等を実施するのが良さそうですね。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0