Slide 1

Slide 1 text

:VVLJ5BLF[BXBZUBLF %3&43&ͷϓϥΫςΟε༥߹ʹΑΔ Ϋϥ΢υωΠςΟϒͳσʔλج൫࡞Γ

Slide 2

Slide 2 text

QSP fi MF • ελʔϑΣεςΟόϧגࣜձࣾ΄͔ • σʔλॲཧ΍͍Ζ͍Ζ • (P4DBMB • ϚΠΫϩαʔϏεΞʔΩςΫνϟɾϦΞΫςΟϒγεςϜɺ ϨΨγʔվળ΍43&%3&ɺ֤छϞσϦϯάͷࢧԉͳͲ • 9IUUQTUXJUUFSDPNFY@UBLF[BXB

Slide 3

Slide 3 text

"HFOEB • %3&ͬͯͲΜͳ͜ͱΛ͢Δͷʁ • Ϋϥ΢υͳΒͰ͸ͷσʔλج൫ͬͯʁ

Slide 4

Slide 4 text

%3&ͬͯͳΜͰ͠ΐ͏ʁ

Slide 5

Slide 5 text

%BUB3FMJBCJMJUZ&OHJOFFSJOH • 43&ͷϓϥΫςΟεΛσʔλ඼࣭؂ࢹͳͲʹద༻ • Ϗδωε΍ҙࢥܾఆʹར༻͢Δ σʔλͷ৴པੑʹؔ͢Δ׆ಈ

Slide 6

Slide 6 text

ͲΜͳ͜ͱΛਐΊ͍ͯ͘ͷ͔

Slide 7

Slide 7 text

σʔλج൫ͬͯͳʹΛ͢Δͷʁ • ձࣾͷυϝΠϯʹΑͬͯ͸ଊ͑ํ͸ҟͳΓ·͢ • σʔλ׆༻Λલఏʹσʔλऩू΍ɺ؅ཧɺ࡞੒ͳͲ σʔλʹؔ͢Δج൫ • σʔλΛΞϓϦέʔγϣϯʹϦόʔε&5-ͨ͠Γɺ ػցֶशʹར༻͞ΕͨΓ

Slide 8

Slide 8 text

σʔλ׆༻ͱ͸ • ձࣾ׆ಈͳͲʹ͓͚Δʮҙࢥܾఆʯ΍ʮۀ຿ޮ཰Խʯɺ ʮϚʔέςΟϯάʯͳͲͷ޲্ʹ໾ཱͯΔ • σʔλυϦϒϯͳاۀจԽ࡞Γʹͳͯ͘͸ͳΒͳ͍΋ͷ • Ͳ͏͍͏σʔλΛΤϏσϯεʹ͍͚ͯ͠͹ྑ͍͔ɺ ͳͲ͸ձࣾʹΑͬͯશ͘ҧ͏ͨΊɺ Կ͔Λࢀߟʹ͢Δͱ׆༻͕Ͱ͖ΔΘ͚Ͱ͸ͳ͍

Slide 9

Slide 9 text

׆༻Ͱ͖ΔΑ͏ʹ͢ΔͨΊʹ͸

Slide 10

Slide 10 text

ࣄۀɾձࣾΛ஌Δ • ࣄۀͷυϝΠϯΛ͔ͬ͠Γͱཧղ͢Δ͜ͱ • υϝΠϯΛཧղ͠ͳ͚Ε͹σʔλʹؔ࿈͢Δ׆ಈ͕೉͍͠ • ୯७ʹσʔλΛू໿͢Δɺ͚ͩͰ͸׆༻͠ʹ͍͘

Slide 11

Slide 11 text

ࣄۀɾձࣾΛ஌Δ • ࣄۀͷཧղ౓Λ্͛Δ͜ͱͰະདྷΛߟ͑ΒΕΔΑ͏ʹ • ະདྷʹߦͨ͘ΊʹݱࡏԿ͕଍Γ͍ͯͳ͍ͷ͔ɺ Ͳ͏͍͏ઓུΛཱͯΔඞཁ͕͋Δͷ͔ • σʔλΛͲ͏׆༻͢ΔͱɾͲΜͳ΋ͷ͕͋Δͱ ໨ࢦ͍ͨ͠ํ޲ʹ޲͔͑Δͷ͔

Slide 12

Slide 12 text

σʔλΛݟΔɺۀ຿Λ஌Δ • ݱঢ়ͷσʔλ͕ͲͷΑ͏ʹͳ͍ͬͯΔͷ͔ • Ͳ͏͍ͬͨۀ຿ϑϩʔɺΞϓϦέʔγϣϯ͕͋Γ ͲͷλΠϛϯάͰσʔλ͕࡞ΒΕΔͷ͔ • ͲͷλΠϛϯάͷσʔλ͕׆༻Ͱ͖Δͷ͔

Slide 13

Slide 13 text

σʔλΛݟΔɺۀ຿Λ஌Δ • σʔλઃܭ͸ΞϓϦέʔγϣϯدΓͳͷ͔ɺ ׆༻ʹ΋଱͑͏Δઃܭʹͳ͍ͬͯΔͷ͔ • อ؅͞ΕΔσʔλͷ඼࣭͸ ҙࢥܾఆ΍ࣄۀ׆ಈʹରͯ͠༗༻͔Ͳ͏͔

Slide 14

Slide 14 text

͋Δ΋ͷΛ৴༻͠ͳ͍ • ࠓ͋Δ΋ͷ͸ෆे෼ͳ΋ͷ͔΋͠Εͳ͍ • ͜͏͍͏σʔλ͕ඞཁͩ • ׆༻͢ΔͨΊʹඞཁͳσʔλ͕ͳ͚Ε͹ Ͳ͔͜Βͦͷσʔλ͕࡞ΒΕͦ͏͔ʢύΠϓϥΠϯʣ

Slide 15

Slide 15 text

͋Δ΋ͷΛ৴༻͠ͳ͍ • ࣄۀυϝΠϯΛཧղ͍ͯ͠ͳ͚Ε͹ɺ σʔλ͕৴༻Ͱ͖Δ͔Ͳ͏͔ͷ൑அ͕͔ͭͳ͍ • σʔλ͕ͲͷΑ͏ʹͳ͍ͬͯΔ΂͖͔ • վળΛ଴ͭͷͰ͸ͳ͘ɺվળ͢ΔͨΊʹඞཁͳ΋ͷΛ ࣗΒ࣮ߦ͢Δ

Slide 16

Slide 16 text

ྫ͑͹ • $73ͳͲΛਖ਼͘͠ೝ஌Ͱ͖Δσʔλ͸ଗ͍ͬͯΔ͔ʁ • Χʔτམͪ͸Ͳͷ͘Β͍ʁ ͦͷ࣌Χʔτʹ͋Δ΋ͷ͸ʁ ߪೖ৘ใͱΧʔτ৘ใ͸ඥ͍ͮͯΔʁ • ར༻͍ͯ͠Δ4BBTαʔϏεͱσʔλ͸݁߹Ͱ͖Δʁ

Slide 17

Slide 17 text

ݴΘΕͨ௨Γʹσʔλͷू໿ɺ సૹΛ͢Ε͹Α͍ɺͱࢥ͍ͬͯ·ͤΜ͔ʁ

Slide 18

Slide 18 text

ϢʔβʔΠϯλϥΫγϣϯΛཧղ͢Δ • Ϣʔβʔͱ͸ࣾ಺֎໰Θͣར֐ؔ܎ऀશͯ • σʔλ͸Կ͔ͷࣄ৅ͷεφοϓγϣοτ • ͲͷΑ͏ͳ΋ͷ͕ࣄ৅ͱѻ͑Δͷ͔

Slide 19

Slide 19 text

ΠϯλϥΫγϣϯΛཧղ͢Δʹ͸ • ΞϓϦέʔγϣϯͷϑϩʔΛ໢ཏ͢Δ • υϝΠϯΠϕϯτΛݟ͚ͭग़͢ • υϝΠϯΤΩεύʔτʹฒ૸ͯ͠΋Β͏ • τϥοΩϯάͷઃܭͳͲʹ΋׆༻

Slide 20

Slide 20 text

Ͳ͔͜Βੜ·ΕͯͲ͜ʹ͍͘ͷ͔

Slide 21

Slide 21 text

Πϕϯτετʔϛϯά • αʔϏεͳͲʹؔΘΔϝϯόʔΛूΊ࣮ͯࢪ • ͲͷΑ͏ͳग़དྷࣄ͕ى͜Δ͔ • ίϯςΩετ͸ͲͷΑ͏ʹͳ͍ͬͯΔ͔ • γεςϜͱυϝΠϯͷؔ܎ੑΛඥղ͘

Slide 22

Slide 22 text

Πϕϯτετʔϛϯά • %3&׆ಈΛߦ͏ϝϯόʔ͚ͩͰ΍Βͳ͍ • ৴པੑΛ্͍͛ͯͨ͘Ίʹ͸จԽ࡞Γ ҙࣝ࡞Γ͕ඞཁෆՄܽ • ؔ܎ऀΛר͖ࠐΈೝࣝΛ߹ΘͤΔ͜ͱ

Slide 23

Slide 23 text

σʔλʹؔ͢Δࢥߟ

Slide 24

Slide 24 text

$3*41%. • σʔλ෼ੳͷϑϨʔϜϫʔΫ • σʔλʹؔ͢Δ৴པੑͱ͸ͳʹ͔Λཧղ͢Δ • ৴པੑΛվળɾҡ͍࣋ͯͨ͘͠Ίʹ͸ඞཁෆՄܽ

Slide 25

Slide 25 text

Ϗδωεͷཧղ • ࣄۀͷํ޲ੑ΍੒௕ઓུɺϏδωεͷ໨ඪɾ໨తΛܾΊΔ • ݱࡏͱͷΪϟοϓ΍ঢ়گΛ೺Ѳ • ୡ੒ج४Λઃ͚ɺୡ੒ʹ͸ͲͷΑ͏ʹ͢΂͖͔ΛܾΊΔ

Slide 26

Slide 26 text

σʔλͷཧղ • ݱࡏͲͷΑ͏ͳσʔλ͕͋Δ͔Λௐࠪ • 3%#.4͚ͩͰͳ͘ɺΤΫηϧͳͲͷιϑτ΢ΣΞ ֤छ4BB4ͳͲͷར༻ঢ়گ΋೺Ѳ • ۀ຿ϑϩʔͳͲ΋ཧղ

Slide 27

Slide 27 text

σʔλͷ४උ • Ͳͷσʔλ͕༗༻͔ɺͲΜͳσʔλ͕ෆ଍͍ͯ͠Δ͔ • ౷߹΍ू໿ɺσʔλΫϨϯδϯάͳͲΛߦ͏ • ͲͷΑ͏ͳ΋ͷΛ༻͍ͯσʔλج൫Λ࡞Δ͔ʹؔΘΔ

Slide 28

Slide 28 text

ϞσϦϯά • Ϗδωε໨ඪͳͲͷୡ੒ΛαϙʔτͰ͖Δ ϞσϦϯάͳͲΛߦ͏ • ෼ੳ࣠΍ɺར༻ํ๏ʹԠͯ͡ෳ਺ͷ࣠ͰϞσϧ࡞੒ • ࣌ܥྻ΍ूܭͳͷ͔ɺ͔ͬ͠Γͱཧղ͠·͠ΐ͏

Slide 29

Slide 29 text

ධՁ • Ϗδωε໨ඪͳͲͷୡ੒ΛαϙʔτͰ͖Δ΋ͷ͔ධՁ • Ͳͷఔ౓ୡ੒Ͱ͖Δ͔ɺͲ͏͍ͬͨ੒ՌʹͳΓͦ͏͔ • ࡞Δ͚ͩͰ͸ͳ͘Ξ΢τΧϜΛେࣄʹ

Slide 30

Slide 30 text

ల։ɾڞ༗ • े෼ͳධՁ͕ಘΒΕΕ͹ɺϑϩʔ΍ γεςϜɾΞϓϦέʔγϣϯͳͲʹಋೖ • ܭଌՄೳͳޮՌଌఆͳͲ΋ߦ͍ ઓུͳͲʹซͤͯϝϯςφϯεͳͲΛܧଓ͢Δ

Slide 31

Slide 31 text

ར֐ؔ܎ऀΛཧղ͢Δ • σʔλ͕ؔ܎͢Δઓུ΍ϑϩʔΛཧղ͢Δ͜ͱͰ ৴པੑͱ͸Կ͔͕ཧղͰ͖Δ • ͲͷΑ͏ͳස౓ɺͲͷΑ͏ͳઓུͰσʔλʹؔ͢Δ ໰୊Λղܾ͍͔ͯ͘͠

Slide 32

Slide 32 text

σʔλͷ४උ

Slide 33

Slide 33 text

σʔλͷ४උ͸೉͍͠ • ෳ਺ͷεςʔΫϗϧμ • αΠϩԽɾ͋ͪͪ͜ʹ͋Δσʔλ • ࿈ଓੑͷͳ͍σʔλ

Slide 34

Slide 34 text

αΠϩԽ • ϓϩμΫτͳͲͷνʔϜͰ ͢Ͱʹσʔλநग़΍֦ு͕ߦΘΕ͍ͯΔ • ձࣾΛԣஅͨ͠ঢ়گ൑அ͕͍ͨ͠ɺͳͲ͕೉͍͠ • ηΩϡϦςΟ΍Ψόφϯε΋ޮ͔ͤΒΕͳ͍

Slide 35

Slide 35 text

࿈ଓੑ͕ͳ͍ • ϓϩμΫτಠࣗͷ*%؅ཧɺෳࡶԽͨ͠*%Ϛοϐϯά • ҰͭͷγεςϜͰ͸Ұ؏ੑ͕͋ͬͯ΋ ԣஅతͳσʔλͱͯ͠ΈΔͱࠞࡏ • σʔλʹ͓͚ΔϥΠϑαΠΫϧͷҧ͍

Slide 36

Slide 36 text

ղܾ͢Δʹ͸ • ϑΟδΧϧ44P5PSϩδΧϧ44P5 • αΠϩԽ͕ਐΜͰ͠·͍ͬͯΔ৔߹͸ ϑΟδΧϧ44P5͔ΒͰͳ͚Ε͹೉͍͠ • σʔλͷ৴པੑʹ௚݁͢Δ໰୊

Slide 37

Slide 37 text

Ϋϥ΢υωΠςΟϒͳσʔλج൫

Slide 38

Slide 38 text

"UIFOBϑΟδΧϧ44P5 • &-5Ͱ4ʹͱʹ͔͘సૹ • υϝΠϯΠϕϯτͳͲΛཧղͨ͠͏͑Ͱ ΄ͱΜͲ͕݁Ռ੔߹Ͱ໰୊ͳ͍ • νʔϜͷن໛͕খ͍͞ͱෆࣗ༝ͳ͠ • ύʔςΟγϣϯઃܭ΋ࢥ͍ͷ··

Slide 39

Slide 39 text

ϨΠϠ

Slide 40

Slide 40 text

ϑΟδΧϧ4405 σʔλιʔε

Slide 41

Slide 41 text

ϑΟδΧϧ4405 ίϨΫςΟϯά ϓϩηογϯά

Slide 42

Slide 42 text

ϑΟδΧϧ4405 ετϨʔδ

Slide 43

Slide 43 text

ϑΟδΧϧ4405 ΞΫηε

Slide 44

Slide 44 text

໰୊ • ؔΘΔਓ͕૿͑Δͱίϯτϩʔϧ͕೉͍͠ • σʔλج൫ʹணख͍ͯ͘͠ͱ ࢥͬͯ΋͍ͳ͔ͬͨࣄ৅ʹग़ձ͏͜ͱ΋ • ͢ͰʹαΠϩԽ͕Ճ଎͍ͯ͠Δ৔߹ ϑΟδΧϧ4405͚ͩͰ͸ݶք

Slide 45

Slide 45 text

໰୊ • ݖݶ͕೉͍͠ • ͪΐͬͱͨ͠ॲཧ͸4QBSLͳͲ͕ඞཁͳͨΊ ηϧϑαʔϏεԽͯ͠΋ɺਁಁ͕೉͍͠ ʢ׳Εͳ͍ٕज़ελοΫ΁ͷڋ൱ʣ

Slide 46

Slide 46 text

4OPX fl BLF΁Ҡߦ • ϑΟδΧϧPSϩδΧϧͱ΋ʹղܾ͕Ͱ͖Δ • ඪ४తͳ42-͚ͩͰଟ͕͘ղܾͰ͖Δ • ֎෦ωοτϫʔΫΞΫηεՄೳ • "UIFOBͳͲͰར༻͍ͯͨ͠1BSRVFU͕ͦͷ··ར༻Ͱ͖Δ

Slide 47

Slide 47 text

ϞσϦϯάɾධՁ

Slide 48

Slide 48 text

σʔλͷϥΠϑαΠΫϧΛೝࣝ͢Δ • ྫ͑͹υϝΠϯΠϕϯτൃੜ͔Β͍ͭ·Ͱʹ σʔλ͕࿈ܞ͞ΕΔ΂͖͔ • 4-*ϝχϡʔGSFTIOFTTͳͲΛࢀߟʹઓུɺ ར༻༻్ɺσʔλϞσϧʹซͤͯσʔλͷ઱౓Λܾఆ

Slide 49

Slide 49 text

χΞϦΞϧλΠϜ 3%4ͳͲͷϨίʔυมߋΛݕ஌ͯ͠ %FCF[JVN͕ߦ৘ใΛ,BGLB΁సૹ ඞཁʹԠͯ͡0VUCPYύλʔϯͳͲΛಋೖ

Slide 50

Slide 50 text

χΞϦΞϧλΠϜ 4OPX fl BLF$POOFDUPSGPS,BGLB Λར༻͠ɺ ,BGLBͷτϐοΫʹ௥ه͞ΕͨλΠϛϯάͰ 4OPX fl BLF΁࿈ܞ

Slide 51

Slide 51 text

Ϩίʔυྫ create or replace view HOGE_DB.RAW_DATA.TEST_IU_VIEW ( ID, NAME, DEBEZIUM_PROCESSED_TS, SOURCE_PROCESSED_TS, SOURCE_SERVER, SOURCE_DB, SOURCE_TABLE, DML_OPERATOR ) as SELECT record_content:"after"."id"::NUMBER as ID, record_content:"after"."name"::NUMBER as NAME, record_content:"ts_ms"::STRING::DATETIME as DEBEZIUM_PROCESSED_TS, record_content:"source"."ts_usec"::STRING::DATETIME as SOURCE_PROCESSED_TS, record_content:"source"."name"::STRING as SOURCE_SERVER, record_content:"source"."db"::STRING as SOURCE_DB, record_content:"source"."table"::STRING as SOURCE_TABLE, record_content:"op"::STRING as DML_OPERATOR FROM HOGE_DB.RAW_DATA.CDC_RAW_TESTS WHERE lower(DML_OPERATOR) in ('r', 'c', 'u');

Slide 52

Slide 52 text

Ϩίʔυྫ create or replace view HOGE_DB.RAW_DATA.TEST_IU_VIEW ( ID, NAME, DEBEZIUM_PROCESSED_TS, SOURCE_PROCESSED_TS, SOURCE_SERVER, SOURCE_DB, SOURCE_TABLE, DML_OPERATOR ) as SELECT record_content:"after"."id"::NUMBER as ID, record_content:"after"."name"::NUMBER as NAME, record_content:"ts_ms"::STRING::DATETIME as DEBEZIUM_PROCESSED_TS, record_content:"source"."ts_usec"::STRING::DATETIME as SOURCE_PROCESSED_TS, record_content:"source"."name"::STRING as SOURCE_SERVER, record_content:"source"."db"::STRING as SOURCE_DB, record_content:"source"."table"::STRING as SOURCE_TABLE, record_content:"op"::STRING as DML_OPERATOR FROM HOGE_DB.RAW_DATA.CDC_RAW_TESTS WHERE lower(DML_OPERATOR) in ('r', 'c', 'u'); ෺ཧ࡟আͷ৔߹͸CFGPSFΛࢀর

Slide 53

Slide 53 text

Ϩίʔυྫ create or replace view HOGE_DB.RAW_DATA.TEST_IU_VIEW ( ID, NAME, DEBEZIUM_PROCESSED_TS, SOURCE_PROCESSED_TS, SOURCE_SERVER, SOURCE_DB, SOURCE_TABLE, DML_OPERATOR ) as SELECT record_content:"after"."id"::NUMBER as ID, record_content:"after"."name"::NUMBER as NAME, record_content:"ts_ms"::STRING::DATETIME as DEBEZIUM_PROCESSED_TS, record_content:"source"."ts_usec"::STRING::DATETIME as SOURCE_PROCESSED_TS, record_content:"source"."name"::STRING as SOURCE_SERVER, record_content:"source"."db"::STRING as SOURCE_DB, record_content:"source"."table"::STRING as SOURCE_TABLE, record_content:"op"::STRING as DML_OPERATOR FROM HOGE_DB.RAW_DATA.CDC_RAW_TESTS WHERE lower(DML_OPERATOR) in ('r', 'c', 'u'); ෺ཧ࡟আͷ৔߹͸E

Slide 54

Slide 54 text

MERGE INTO HOGE_DB.STAGING_DATA.TESTS as tgt USING ( SELECT * FROM ( SELECT *, ROW_NUMBER() over ( PARTITION BY ID ORDER BY DEBEZIUM_PROCESSED_TS DESC ) as row_num FROM ( SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_IU_VIEW UNION ALL SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_D_VIEW ) as u ) as t1 WHERE t1.row_num = 1 ) as src ON tgt.ID = src.ID WHEN MATCHED AND src.DML_OPERATOR = 'd' THEN DELETE WHEN MATCHED AND src.DML_OPERATOR = 'u' THEN UPDATE SET tgt.ID = src.ID, tgt.NAME = src.NAME WHEN NOT MATCHED AND src.DML_OPERATOR IN ('c', 'r', 'u') THEN INSERT ( ID, NAME ) VALUES ( src.ID, src.NAME );

Slide 55

Slide 55 text

MERGE INTO HOGE_DB.STAGING_DATA.TESTS as tgt USING ( SELECT * FROM ( SELECT *, ROW_NUMBER() over ( PARTITION BY ID ORDER BY DEBEZIUM_PROCESSED_TS DESC ) as row_num FROM ( SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_IU_VIEW UNION ALL SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_D_VIEW ) as u ) as t1 WHERE t1.row_num = 1 ) as src ON tgt.ID = src.ID WHEN MATCHED AND src.DML_OPERATOR = 'd' THEN DELETE WHEN MATCHED AND src.DML_OPERATOR = 'u' THEN UPDATE SET tgt.ID = src.ID, tgt.NAME = src.NAME WHEN NOT MATCHED AND src.DML_OPERATOR IN ('c', 'r', 'u') THEN INSERT ( ID, NAME ) VALUES ( src.ID, src.NAME ); 3%4ͳͲ͔ΒϨίʔυ͕࡟আ͞Εͨ৔߹͸ 4OPX fl BLF͔Β΋࡟আ

Slide 56

Slide 56 text

MERGE INTO HOGE_DB.STAGING_DATA.TESTS as tgt USING ( SELECT * FROM ( SELECT *, ROW_NUMBER() over ( PARTITION BY ID ORDER BY DEBEZIUM_PROCESSED_TS DESC ) as row_num FROM ( SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_IU_VIEW UNION ALL SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_D_VIEW ) as u ) as t1 WHERE t1.row_num = 1 ) as src ON tgt.ID = src.ID WHEN MATCHED AND src.DML_OPERATOR = 'd' THEN DELETE WHEN MATCHED AND src.DML_OPERATOR = 'u' THEN UPDATE SET tgt.ID = src.ID, tgt.NAME = src.NAME WHEN NOT MATCHED AND src.DML_OPERATOR IN ('c', 'r', 'u') THEN INSERT ( ID, NAME ) VALUES ( src.ID, src.NAME ); Ϩίʔυ͕ߋ৽͞Εͨ৔߹͸ 4OPX fl BLFͷϨίʔυ΋ߋ৽

Slide 57

Slide 57 text

MERGE INTO HOGE_DB.STAGING_DATA.TESTS as tgt USING ( SELECT * FROM ( SELECT *, ROW_NUMBER() over ( PARTITION BY ID ORDER BY DEBEZIUM_PROCESSED_TS DESC ) as row_num FROM ( SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_IU_VIEW UNION ALL SELECT ID, NAME, DEBEZIUM_PROCESSED_TS, DML_OPERATOR FROM HOGE_DB.RAW_DATA.TEST_D_VIEW ) as u ) as t1 WHERE t1.row_num = 1 ) as src ON tgt.ID = src.ID WHEN MATCHED AND src.DML_OPERATOR = 'd' THEN DELETE WHEN MATCHED AND src.DML_OPERATOR = 'u' THEN UPDATE SET tgt.ID = src.ID, tgt.NAME = src.NAME WHEN NOT MATCHED AND src.DML_OPERATOR IN ('c', 'r', 'u') THEN INSERT ( ID, NAME ) VALUES ( src.ID, src.NAME ); 4OPX fl BLFʹσʔλ͕ͳ͍͕ɺ ࡟আҎ֎ͷϨίʔυૢ࡞͕͋ͬͨ৔߹͸ *OTFSU

Slide 58

Slide 58 text

઱౓͕ྑ͍৔Ͱ΋γϯϓϧʹ • ଟগͷ࿈ܞઃఆ͸͋Γ·͕͢ɺ42-͚ͩͰ׬݁ • ࿈ܞ͕ࣦഊͯ͠΋σʔλ͸յΕͳ͍ • ࿈ܞ͠௚͍ͨ͠৔߹͸%FCF[JVNͰ಄͔Β࠶࿈ܞ • ϦεΫ΋ཧղ͠ɺӨڹൣғΛ࠷খݶʹ

Slide 59

Slide 59 text

ߟྀ • Ϩίʔυ਺͕ଟ͍৔߹΍ɺ ༨ܭͳ௨৴͕ൃੜ͠ͳ͍Α͏ʹ͍ͨ͠৔߹ͳͲ͸4ͳͲ΋ซ༻ • ϦΞϧλΠϜੑ͕ຊ౰ʹඞཁ͔Ͳ͏͔ ٻΊΒΕΔ઱౓ɾ৴པੑΛ໌Β͔ʹ͢Δ • ECUͳͲ΋ར༻

Slide 60

Slide 60 text

֎෦ωοτϫʔΫܦ༝ͷ࿈ܞ • "1*͕ެ։͞Ε͍ͯΔαʔϏεͳͲ͸ͦͷ··࿈ܞՄೳ • 6%'΍ετΞυϓϩγʔδϟͱͯ͠૊ΈࠐΊΔ΋ͷ • σʔλج൫ͳͲͷετϨʔδʹͳͯ͘΋ ࿦ཧతʹ౷߹Մೳ

Slide 61

Slide 61 text

τΠϧͷ࡟ݮ

Slide 62

Slide 62 text

τΠϧͷ࡟ݮ • ηϧϑαʔϏεͷͨΊͷࣗಈԽ &-54OPX fl BLFͳͲ • ϓϩμΫτ͝ͱͷՄࢹԽπʔϧಋೖͳͲͷͨΊͷ ݖݶઃܭ • Ξϥʔτͷ௨஌

Slide 63

Slide 63 text

τΠϧͷ࡟ݮ • 4DIFNB&WPMVUJPO • δϣϒεέδϡʔϧ؅ཧ • ϦτϥΠ

Slide 64

Slide 64 text

ͳΜͰ΋ࣗಈԽ͢Ε͹ྑ͍Θ͚Ͱ͸ͳ͍ • ࣗಈԽ͗ͨ͢͜͠ͱʹΑΔࣄނ • νʔϜͷೝ஌౓ෛՙ • νʔϜͷ݈߁ঢ়ଶɾϞνϕʔγϣϯ

Slide 65

Slide 65 text

඼࣭ςετ

Slide 66

Slide 66 text

ਖ਼֬ੑ • ଞ؀ڥͰ࡞ΒΕͨσʔλͱࠩҟ͕ͳ͍͔Ͳ͏͔ • ֹۚܭࢉͳͲͷζϨ͸ਖ਼֬ͳҙࢥܾఆʹͭͳ͕Βͳ͍ • ܭࢉࣜ΍Ϩίʔυ਺ɺΧϥϜͳͲ΋ظ଴஋Λຬ͔ͨ͢ • Ͳͷ͘Β͍ڐ༰͞ΕΔ΋ͷ͔ೝࣝΛ͋ΘͤΔ

Slide 67

Slide 67 text

ਖ਼֬ੑ • 99͔Β࿈ܞ͞Εͨσʔλ͕೔ؒͰ औΓѻֹ͍ۚͱҰக͍ͯ͠Δ͜ͱͳͲ • ظؒ಺ͰɺఆΊͨ݅਺Ҏ্ະ࿈ܞ΍ͣΕ͕͋Δ৔߹͸ ରԠΛ͠ͳ͚Ε͹ͳΒͳ͍ • ೝ͕ࣝ߹্ͬͨͰܰඍͳ΋ͷͰ͋Ε͹࠶࿈ܞ࣮ߦͳͲ

Slide 68

Slide 68 text

Ұ؏ੑ • Ұ؏ੑͷ͋ΔϑΥʔϚοτʹԊ͍ͬͯΔ͔Ͳ͏͔ • ͓͔͠ͳσʔλϑΥʔϚοτ͕ࠞࡏ͍ͯ͠ͳ͍͔Ͳ͏͔ ੔߹ੑʹ໰୊͕ͳ͍͔ • ಉ༷ʹ4-0ͳͲΛ໌ه͠ɺ σʔλͷमਖ਼PSϑϩʔͳͲຊ࣭తͳվળΛߦ͏

Slide 69

Slide 69 text

͜͜ʹ͋Δ΋ͷ͸΄ΜͷҰ෦

Slide 70

Slide 70 text

·ͱΊ • ࣄۀཧղͱυϝΠϯΛ͔ͬ͠ΓͱטΈࡅ͘ • ࣄۀͷະདྷΛ૝૾͠ɺͦ͜ʹඞཁͳσʔλΛཧղ͢Δ • 43&ͷϓϥΫςΟεΛऔΓೖΕɺଟ͘Λר͖ࠐΜͰਪਐ • Ϋϥ΢υΛ׆༻ͯ͠ར༻͠΍͍͢σʔλج൫࡞Γ