【AWS】Athena ~ 基本編 / AWS Glue との連携 ~

■ はじめに

https://dk521123.hatenablog.com/entry/2020/06/17/173717

の続き。

今回は、AWS Glue で、クローリングしたデータを
Athena で表示する際のメモ。

AWS Glue の クローラについては、以下の関連記事を参照のこと。

https://dk521123.hatenablog.com/entry/2019/12/01/003455

■ 簡易手順

1)AWS Athena のページにおいて、左側のペインのDatabase欄に
  クローラで指定したDatabaseを選択する
 ⇒ 選択したら、その下のTablesに、Glueで作成したテーブルが表示されるはず
2)あとは、クエリー欄に、SQL文を書いて、「Run query」ボタン押下するだけ

補足:Amazon Athena の SELECT について

Amazon Athena の SELECT は、以下のサイトを参照のこと。

https://dev.classmethod.jp/articles/amazon-athena-sqls/
公式サイト
https://docs.aws.amazon.com/ja_jp/athena/latest/ug/select.html

■ 使用上の注意

基本的なことも含めて...

* Glue で扱うだろうから、データがでかいと思うので、
 LIMITなどでデータを絞ったりする
~~~~~~
SELECT * FROM your_db.your_table LIMIT 10;
~~~~~~

参考文献

公式サイト
https://docs.aws.amazon.com/ja_jp/athena/latest/ug/glue-best-practices.html
一般サイト
https://dev.classmethod.jp/articles/glue-crawler-athena-tutorial/
https://dev.classmethod.jp/articles/sugano-037-glue-for-athena/
https://xp-cloud.jp/blog/2019/04/22/4186/
https://qiita.com/KC_NN/items/67e69cb732d4ea6b2b4f
https://tikasan.hatenablog.com/entry/2018/06/26/201655
https://qiita.com/pioho07/items/45b5b6412141e73c552d

関連記事

Amazon Athena ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2020/06/17/173717
Athena ~ AWS CLI
https://dk521123.hatenablog.com/entry/2023/10/13/144254
AWS Glue ~ 基本編 / クローラ ~
https://dk521123.hatenablog.com/entry/2019/12/01/003455