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
iQONを支えるデータ分析基盤/iqon-bigquery
Search
Masayuki Imamura
April 23, 2015
Programming
3
10k
iQONを支えるデータ分析基盤/iqon-bigquery
2015.04.23 えびスタ vol2での発表内容です @kyuns
Masayuki Imamura
April 23, 2015
Tweet
Share
More Decks by Masayuki Imamura
See All by Masayuki Imamura
バイセルにおけるAI活用の取り組みについて紹介します/Generative AI at BuySell Technologies
kyuns
2
410
経営視点から捉えた開発生産性 / Development productivity from a management perspective
kyuns
12
8.5k
Qiita:Teamをハックして成果をあげるための情報共有方法/Qiita:Team
kyuns
6
3.4k
3年連続ベストアプリ受賞のプロダクトを支える裏側/The way to Achieve The Best App 3 years in a row
kyuns
1
1.6k
機械学習とデータ分析を支えるマルチクラウドなアーキテクチャの紹介/Multi Cloud Architecture Supporting Machine Learning and Data Analysis
kyuns
4
9.6k
日本最大級のファッションDBを支える裏側/how to manage the complex web service
kyuns
4
840
iQONを支えるクローラー/iQON Crawler
kyuns
12
4.1k
iQON Tools
kyuns
1
3.8k
プッシュ通知大戦争/effective push notification by iQON
kyuns
28
8.3k
Other Decks in Programming
See All in Programming
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
From Translations to Multi Dimension Entities
alexanderschranz
2
130
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
130
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
4
560
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
Spatial Rendering for Apple Vision Pro
warrenm
0
110
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
410
Symfony Mapper Component
soyuka
2
730
命名をリントする
chiroruxx
1
410
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Visualization
eitanlees
146
15k
Become a Pro
speakerdeck
PRO
26
5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Site-Speed That Sticks
csswizardry
2
190
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
It's Worth the Effort
3n
183
28k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Why Our Code Smells
bkeepers
PRO
335
57k
Transcript
J20/Λࢧ͑Δ σʔλੳج൫ͱ#JH2VFSZ ͑ͼελWPM 7"4*-:!LZVOT
ࠓଜխ !LZVOT 7"4*-: *OD औక$50$P'PVOEFS ʹ:BIPP+"1"/ʹ৽ଔೖࣾ :BIPP'"4)*0/ɺ9#3"/%ͳͲͷϝσΟΞͷ্ཱͪ͛ ʹಠཱɺ7"4*-:Λۀɺऔక$50ʹब ͖ͳ༏ਫथಸʑ
ঁੑͷϑΝογϣϯϥΠϑΛΦγϟϨʹً͔ͤΔͨΊͷɺ ண͍ͨίʔσ͕ݟ͔ͭΔɺങ͑ΔɺஷΊΒΕΔϑΝογϣϯΞϓϦɻ ݱࡏສͷձһొ ٕज़ސ·ͭͱΏ͖ͻΖ
J20/ͷσʔλͱʁ
w ΞϓϦΠϕϯτϩά w ϓογϡ௨ϩά w Ϛελʔσʔλ w ηʔϧεσʔλ શͯ#JH2VFSZʹ͍Εͨ
ͳͥσʔλΛूΊͨͷ͔ w ࣾͷ৭ʑͳσʔλ͕༷ʑͳετϨʔδʹࢄ ͍ͯ͠Δʢ.Z42- .POHP%# ֤छ4BB4ʜ w σʔλΛՕॴʹूΊͯޮతʹੳ͍ͨ͠ w
#*πʔϧͰΰϦΰϦੳ͍ͨ͠ w μογϡϘʔυ࡞Γ͍ͨ
ͳͥ#JH2VFSZͳͷ͔ʁ w JNQPSUͷܗ͕ࣜॊೈͰ͋Δ w #*πʔϧରԠ UBCMFBV w ԯϨίʔυͰߴʹಈ͘ w
qVFOUEͷQMVHJO͕ἧͬͯΔ w TUSFBNJOHJOTFSUʹରԠ͍ͯ͠Δ
w ΞϓϦΠϕϯτϩά w ϓογϡ௨ϩά w Ϛελʔσʔλ w ηʔϧεσʔλ
ΞϓϦߦಈϩά ΞϓϦղੳπʔϧʮ-PDBMZUJDTʯͷੜσʔλ ϢʔβʔͷશΠϕϯτΛهͨ͠+40/ ԯߦ݄
ऩूΞʔΩςΫνϟ Amazon S3 "844 &$ (PPHMF$MPVE4UPSBHF #JH2VFSZ ΞϓϦ JNQPSUCBUDI -PDBMZUJDTͷTCVDLFU͔Β($4ܦ༝Ͱ#JH2VFSZʹDPQZ
ͷͰҰ(PPHMF$MPVE4UPSBHFʹDPQZͨ͠΄͏͕͍ ఆظతʹ#BUDIͰJNQPSU
w ΞϓϦΠϕϯτϩά w ϓογϡ௨ϩά w Ϛελʔσʔλ w ηʔϧεσʔλ
ϓογϡ௨ϩά w ΞϓϦͷϓογϡ௨ͷϩά w શͯͷϓογϡͷૹ৴ɺ։෧ϩά ສRQT w ϓογϡͷ$53ޮՌݕূλʔήςΟϯάΞϧ ΰϦζϜͳͲͷ࠷దԽʹར༻
w qVFOUE͕େ׆༂
ϩάϑΥʔϚοτ ͍ͭͲͷVTFSʹରͯ͠ͲΜͳϓογϡΛૹ͔ͬͨɺ։͍͔ͨ
ϓογϡϩάΞʔΩςΫνϟ #JH2VFSZ "1*4FSWFST qVFOUE "1/T ($. -PH4FSWFS qVFOUE qVFOUEܦ༝Ͱ#JH2VFSZʹ 4USFBNJOH*OTFSU
qVFOUQMVHJOCJHRVFSZΛར༻ ΞϓϦ Amazon S3 "844 ૹ৴ϩά ΫϦοΫϩά ૹ৴ˍΫϦοΫϩά
<case event.notification.click> <store> type bigquery method insert auth_method private_key email
[email protected]
private_key_path /home/vasily/fluentd/XXXXXX.p12 buffer_type file flush_interval 0 try_flush_interval 0.05 queued_chunk_flush_interval 0.01 buffer_chunk_records_limit 250 buffer_chunk_limit 512k bugger_queue_limit 1024 retry_limit 5 retry_wait 0.5 num_threads 32 dataset app project iqon-data-mining auto_create_table true table event_notification_click_%Y%m schema_path /home/vasily/fluentd/schema_event_notification_click.json buffer_path /var/log/td-agent/buffer/bigquery/event.notification.click </store> </case> ສRQTҎ্ʹ͑ΔͨΊʹ CV⒎FS@UZQFΛpMFʹ͠ͳ͍ͱ͍͚ͳ͔ͬͨ
w ΞϓϦΠϕϯτϩά w ϓογϡ௨ϩά w Ϛελʔσʔλ w ηʔϧεσʔλ
Ϛελʔσʔλ w .Z42- 3%4 ʹ͋ΔJ20/ͷதͷϚελʔσʔλ 6TFST *UFNT 4FUT #SBOET 4IPQʜFUD
w ϢʔβʔͷΞΫςΟϏςΟσʔλ ΞΠςϜ-*,& ίʔσ-*,& ϑΥϩʔʜFUD ԯϨίʔυͱ͔͋Δςʔϒϧୡ w "84্ͷ3%4ʹ֨ೲ͞Ε͍ͯΔͷΛ#JH2VFSZʹ 4ZOD
TZODํ๏ w ಠࣗεΫϦϓτͰҰׅJNQPSU w .Z42-ͷςʔϒϧఆ͔ٛΒࣗಈతʹ#JH2VFSZ ͷ4DIFNBΛੜ w ·Δ͝ͱςʔϒϧΛEVNQͯ͠·Δ͝ͱDPQZ w ઍສϨίʔυͰͦΜͳʹ͔͔࣌ؒΒͳ͍
ఔ
3%4UP#JH2VFSZ "843%4 &$ (PPHMF$MPVE4UPSBHF #JH2VFSZ JNQPSUCBUDI EFTDUBCMF@OBNFͨ͠༰͔Β#JH2VFSZͷTDIFNBKTPOΛੜ TFMFDU GSPNUBCMF@OBNFUBCMFUTWͨ͠༰Λ($4ʹVQMPBEͨ͠ޙɺ #JH2VFSZʹλϒ۠ΓUTWͱͯ͠DPQZΧϯϚ۠ΓͷσʔλʹରԠ͢ΔͨΊ
bq load --max_bad_record=1000 --project_id=iqon-data-mining —source_format=CSV --field_delimiter='\t' --skip_leading_rows=1 iqon-data- mining:app.#{@table_name} gs://iqon-rds/#{@table_name}.tsv schema_#{@table_name}.json
w ΞϓϦΠϕϯτϩά w ϓογϡ௨ϩά w Ϛελʔσʔλ w ηʔϧεσʔλ
ηʔϧεσʔλ w ΞΠςϜͷߪೖΫϦοΫɺߪೖྃσʔλ w ֨ೲઌ.POHP%# w ͱͯେ͖͍ίϨΫγϣϯʢे(
w NPOHPCRΛ༻͍ͯ#JH2VFSZʹҰׅJNQPSU !IBLPCFSB IUUQTHJUIVCDPNIBLPCFSBNPOHPCR
.POHP%#UP#JH2VFSZ &$ (PPHMF$MPVE4UPSBHF #JH2VFSZ JNQPSUCBUDI NPOHPCRίϚϯυΛ༻͍ͯTUSFBNͰॲཧͯ͘͠ΕΔ TDIFNBࣗಈఆػೳ͋Δ͕ɺಠࣗͰTDIFNBΛࢦఆͰ͖Δ ࢦఆ͢ΔLFZpMFQͰͳ͘KTPOܗࣜͷͷͳͷͰҙ mongobq --host
mongo02c --port 27017 --database iqon_conversion --collection click_log -q '{"date": "#{date}"}' --project iqon-data-mining --dataset app --keyfile /home/vasily/XXXX.json -B iqon-mongo -T click_log_test --schema ./ schema_mongo_iqon_conversion_click_log.json --autoclean
ΞΫηεσʔλ ൪֎ฤ w (PPHMF"OBMZUJDTͷσʔλ (PPHMF"OBMZUJDTϓϨϛΞϜͳΒ#JH2VFSZʹ ੜσʔλΛࣗಈతʹJNQPSUͯ͘͠ΕΔ w ສԁ݄͙Β͍ͱ͍͏ᷚ
·ͱΊ w શͯͷσʔλϩάΛ#JH2VFSZՕॴʹूΊͨ ͓͔͛Ͱੳ͕֨ஈʹޮతʹͳͬͨ ϚελʔσʔλͱϩάσʔλΛ+0*/ͯ͠ੳ w #JH2VFSZ҆ͯ͘͏·͍ 5#ετϨʔδ݄ͬͯ ԁఔ εΩϟϯྉ͕5#͋ͨΓ݄ԁఔ
ݱࡏ
8F`SF)JSJOH J20/ຊͰҰ൪ϑΝογϣϯʹ ؔ͢Δσʔλ͕ू·ΔॴͰ͢ɻ σʔλΛͬͯνϟϨϯδͯ͠Έ͍ͨਓΛ ͓͓ͪͯ͠Γ·͢ɻ JOGP!WBTJMZKQ