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
Japan.R 2018 LT
Search
chengvt
December 01, 2018
Technology
650
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Japan.R 2018 LT
chengvt
December 01, 2018
Other Decks in Technology
See All in Technology
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
0
200
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
400
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
830
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
2
1.3k
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
180
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
6
7.2k
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
270
いかに伝えるか 〜新卒エンジニアの教育のための、ライトノベル活用の一例
ikedon
1
210
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
2
240
Azure App Service / Container Apps の組み込み認証
kuniteru
0
200
bet_ai_day_2026_session02
agenticsec
1
1k
Tab5をRubyで動くパソコンにする
kishima
1
190
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
The SEO Collaboration Effect
kristinabergwall1
1
550
The Spectacular Lies of Maps
axbom
PRO
1
970
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
770
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Product Roadmaps are Hard
iamctodd
55
13k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
520
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Bash Introduction
62gerente
615
220k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
890
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Transcript
でRをバッチで回す Japan.R 2018 LT 2018.12.01 @chengvt り
自己紹介 nickname: チェン job: メディア系会社で二年目のアナリスト hobby:登山 R package: chengvt/MovingBubbles
Motivation • アドホック分析用データ作成+モデルを周期的に回すため、定型処理 をバッチ化したくなる • 手元のサーバで以前cron使いましたが、digdagというワークフロー エンジンに乗り換えました • 本日はdigdagでR処理を回す例を紹介
デモ やりたいこと 今年8月に生まれたパンダちゃんの 最新体重の推移を知りたい (名前投票受付中らしい)
パンダちゃんの体重はツイッター で毎日公開されています @aws_official
Rスクリプトを用意する • get_panda.R – twitterから最新情報を取得し、ファイルに保存 • plot_panda.R – 体重推移をプロットし、ファイルに保存
定形処理をバッチ化 で楽な作業に! スクリプトがあっても定期的 に実行するのは大変
digdagをサーバにインストール 詳細:https://www.digdag.io/
digファイルを書く 日本時間を使ってね 毎日17時に回してね これらのRスクリプト回 してね
ワークフローの登録 * セークレット利用やもっとカスタマイズする場合はdigdag schedulerではなくて、digdag server + digdag pushが良さそう * 「nohup
コマンド &」で端末を閉じてもログアウトしても処理を続ける digdag scheduler -n 1234 -b 127.0.0.1 Runs a workflow scheduler that runs schedules periodically. This picks up all workflow definition files named with .dig suffix at the current directory. ポート アドレス ワーキングフォルダー で実行して完了
UIがあって、Webブラウザで見れるよ 設定したアドレスとポートでアクセス 例: http://127.0.0.0:1234
便利なプラグインもあるよ • digdag-slack https://github.com/szyn/digdag-slack
まとめ • digdagでRをバッチで回す例を紹介した