LoginSignup
2
1

More than 3 years have passed since last update.

AthenaのQUEUEのステータス

Posted at

みなさんAthenaを知っているだろうか。
S3のファイルにqueryを発行して中身を検索できるあれである(雑)

そのAthenaをプログラム上から使う場合、CLIかBoto3あたりを使用すると思う。
start_query_execution でqueryを実行し、
その終了を get_query_execution で監視すると思う。

コードでは、この get_query_execution をつかってqueryのステータスを監視し、waitしたりException吐いたりしたいと思う。
get_query_execution が返してくるqueryのstatusは以下である。

  • QUEUED
  • RUNNING
  • SUCCEEDED
  • FAILED
  • CANCELLED

私はQUEUEDというステータスがあることを知らずにプログラムを組んだため
この世に新しいバグを生み出すという罪深いことをしてしまった。
みなさんが私と同じ罪を犯さないように、ここに記しておく。

参考資料
https://docs.aws.amazon.com/ja_jp/athena/latest/APIReference/API_QueryExecutionStatus.html

2
1
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
2
1