Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Airflowはすごいぞ!
Search
Hank Ehly
June 08, 2022
Programming
960
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Airflowはすごいぞ!
Hank Ehly
June 08, 2022
Transcript
17 slides
Airflowはすごいぞ!
自己紹介 • Hank Ehly (ハンク イーリー) • ENECHANGE株式会社 • qiita.com/hankehly
アジェンダ • Airflowとは • コンセプト qiita.com/hankehly
Airflowとは
Airflowとは > 概要 • ワークフローを作成、実行、監視するためのプラットフォーム • Python • Airbnb、メルカリ、楽天、Tesla、Twitter、等々 •
マネージド版 ◦ Amazon Managed Workflows for Apache Airflow (AWS) ◦ Cloud Composer (GCP) ◦ Astronomer qiita.com/hankehly
Airflowとは > 解決する問題 1. タスクの依存関係を明確にする qiita.com/hankehly ドキュメントやコメントで書く タスクがフローチャートとして表示される 2. エラーが起きた箇所を特定する
追跡できるようなログを出力する エラー表示のタスクをクリックしてログを確認する 3. タスクを同時に実行する multiprocessing や asyncio で頑張る 依存関係がないタスクは同時に実行される 4. 失敗しがちな処理を3回までリトライする リトライ用のデコレーター関数を使う タスクの「最大リトライ数」を設定する 等々… ワークフローの開発において様々な課題がある …
Airflowとは > 使い方のイメージ ワークフロー名 成功/失敗回数 実行頻度 qiita.com/hankehly
Airflowとは > 使い方のイメージ qiita.com/hankehly
Airflowとは > 使い方のイメージ N回目の実行のログ qiita.com/hankehly
Airflowとは > 使い方のイメージ qiita.com/hankehly
コンセプト
コンセプト > DAGs • DAGとは「Directed Acyclic Graph」の略 • ワークフロー/パイプライン •
依存関係にあるタスクをどの順番で実行するか qiita.com/hankehly
コンセプト > Tasks • DAGは、Taskで構成されている • Python関数、Rubyのコンテナ、Bashスクリプト • 状態を持つ ◦
リトライ待ち ◦ 実行中 ◦ 失敗 / 成功 ◦ 等々… qiita.com/hankehly Airflowで表示 a >> [b, c] >> d 開発者が書く
コンセプト > Operators • 「タスクのテンプレート」 • 用意されているものがたくさんある ◦ BashOperator(Bashコマンドを実行) ◦
EC2StartInstanceOperator(EC2インスタンスを起動する) ◦ PythonOperator(Python関数を実行) ◦ EmailOperator(Eメールを送信する) ◦ DockerOperator(コンテナを実行) ◦ SlackAPIPostOperator(Slackにメッセージを投稿する) start_instance = EC2StartInstanceOperator( task_id="start_instance", instance_id="***", ) Operatorの使い方 qiita.com/hankehly
コンセプト > Variables start_instance = EC2StartInstanceOperator( task_id="start_instance", instance_id=Variable.get("INSTANCE_ID"), ) qiita.com/hankehly
コンセプト > Logging UI から個別のタスクログが確認できる • S3 • CloudWatch •
Google Cloud Storage • Elasticsearch qiita.com/hankehly
ご清聴ありがとうございました https://qiita.com/hankehly/items/1f02a34740276d1b8f0f
More Decks by Hank Ehly
See All by Hank Ehly
Fivetranでデータ移動を自動化する
hankehly
0
700
Celeryの紹介と本番運用のTips
hankehly
0
1.8k
ChatGPTを活用した 便利ツールの紹介
hankehly
1
1.4k
Efficient Energy Analytics with Airflow, Spark, and MLFlow
hankehly
0
440
Deferrable Operators入門
hankehly
0
830
【初心者/ハンズオン】Dockerコンテナの基礎知識
hankehly
0
630
Compositeパターン: オブジェクトの階層関係をエレガントに表現する方法
hankehly
0
380
10/29 Airflowの基礎を学ぶハンズオンワークショップ
hankehly
0
350
システム/データ品質保証のための Airflow 活用法
hankehly
0
710
Other Decks in Programming
See All in Programming
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
240
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
あなたはMCPの機能を、まだ知らない。
4geru
1
740
protojson における文字化けの扱い
kazuki1023
0
470
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
120
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
vue-tsc x TypeScript7
koukimiura
0
100
はじめてのPLATEAU
nokonoko1203
1
670
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
1.3k
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
小さなアプリを作って公開するまで
onozaty
0
260
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
The SEO Collaboration Effect
kristinabergwall1
1
630
Skip the Path - Find Your Career Trail
mkilby
1
300
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k
The Pragmatic Product Professional
lauravandoore
37
7.5k
The World Runs on Bad Software
bkeepers
PRO
72
12k
4 Signs Your Business is Dying
shpigford
187
23k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
680
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620