Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Amazon Athenaで気軽に始める データ分析/athena-data-analytics
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
marchin
August 31, 2023
Programming
0
600
Amazon Athenaで気軽に始める データ分析/athena-data-analytics
marchin
August 31, 2023
Tweet
Share
More Decks by marchin
See All by marchin
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
790
WebAPI開発のためのOpenAPI入門/entry-open-api
marchin1989
1
1.4k
AWS Glueではじめるデータレイク
marchin1989
0
700
やさしく入門するOAuth2.0/easy-entry-oauth
marchin1989
8
2.7k
1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
marchin1989
2
1.6k
自動テストでモックするって、なにそれ?おいしいの?/what_is_mocking
marchin1989
1
1.3k
たぶんもう怖くないGit/maybe-not-afraid-of-git-anymore
marchin1989
2
2.7k
モバイルアプリで機械学習入門/introduction-to-machine-learning-in-mobile-app
marchin1989
0
510
Other Decks in Programming
See All in Programming
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
120
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
700
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Claude Codeログ基盤の構築
giginet
PRO
7
3.4k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
1
350
Ruby and LLM Ecosystem 2nd
koic
1
980
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
470
AI活用のコスパを最大化する方法
ochtum
0
190
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
5
1.1k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
140
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
260
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building an army of robots
kneath
306
46k
Site-Speed That Sticks
csswizardry
13
1.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
830
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
760
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Invisible Side of Design
smashingmag
302
51k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
77
Transcript
Amazon Athenaで 気軽に始めるデータ分析
自己紹介 名前 :阿部 真之 仕事 :株式会社ゆめみ。サーバーサイド、Androidのリードエンジニア 趣味 :コーヒー、ビール、アニメ、ゲーム、読書、etc… Twitter:@marchin_1989
前置き 対象者 - なにかしらデータ分析に関わる方 - AWS Athenaを触ったことがない方 前提とする知識 - AWSのサービスを少しでも触ったことがある方
- SQLを触ったことがある方
アジェンダ - Amazon Athenaとは - Amazon Athenaのデモ
Amazon Athenaとは
Amazon Athena - S3や、様々なデータソースに対して、SQLでクエリできるインタラクティブな分析サービス。 - サーバーレスでインフラ管理不要。 - 大規模データに対しても高速なクエリが可能。 - ユースケース
- アナリストやデータサイエンティストによるアドホックな分析 - S3にあげて、テーブル定義後、すぐクエリ可能。 - ログ分析 - S3に保存した、ログデータに対してクエリ - ETLパイプライン
デモ
デモ - AWSマネジメントコンソールの「クエリエディタ」からクエリを実行してみる。
デモ - 公式のチュートリアルを実施 - https://docs.aws.amazon.com/ja_jp/athena/latest/ug/getting-started.html - サンプルデータ - s3://athena-examples-ap-northeast-1/cloudfront/plaintext/ -
CFのアクセスログ
デモの流れ 1. クエリ結果保存用のS3バケットを指定する 2. データベースを作成する 3. テーブルを作成する 4. クエリする
1. クエリ結果保存用のS3バケットを指定する
2. データベースを作成する
3. テーブルを作成する
4. クエリする
その他 - 基本的にクエリのスキャン量で課金される。1 TB あたり5USD。 - スキャン量を削減することで、パフォーマンスが向上し、料金が安くなる。 - パーティション化 -
Hive形式(例: s3://bucketname/year=2023/month=05/day=08/…)のS3に対して、テーブル 作成時にパーティションを指定する。 - Federated Query - S3だけでなく、RDS、DynamoDBといった様々なデータソースに対してクエリを実行可能。 - S3のデータに対して、RDSのテーブルを結合してクエリできる。 - クエリエディタ以外でも、アプリケーションなどからJDBC経由、AWS SDK(API)経 由で実行可能。
まとめ - Amazon Athenaは、S3や、様々なデータソースに対して、SQLでクエリできるイン タラクティブな分析サービス。 - S3にデータを溜めておけば、気軽にデータ分析が始められる。
参考文献 ・YouTube, 【AWS Black Belt Online Seminar】Amazon Athena,https://www.youtube.com/watch?v=6FLkOE60Pfs,(2020/06/18) ・AWS, Amazon
Athena とは, https://docs.aws.amazon.com/ja_jp/athena/latest/ug/what-is.html