åºæ¬çã«ãããŒã¿ã»ã³ã¿ãŒã«ããŒã«ã«ã«å±éãããŠããå žåçãªSAP HANAãã©ãããã©ãŒã ã® SAP HANAã°ã©ããªãã¡ã¬ã³ã¹ããã¥ã¡ã³ãã®ä»é²B-ã®ãªã·ã£ç¥è©±ã°ã©ãã®äŸã®ã¹ã¯ãªããã䜿çšããŸãããã®äŸã®äž»ãªç®çã¯ãSAP HANAã®åææ©èœã瀺ããã°ã©ãã¢ã«ãŽãªãºã ã䜿çšããŠãªããžã§ã¯ããšã€ãã³ãã®é¢ä¿ãåæããæ¹æ³ã瀺ãããšã§ãããã®ãã¯ãããžãŒã«ã€ããŠè©³ãã説æããããšã¯ããŸããããäž»èŠãªã¢ã€ãã¢ã¯ä»åŸã®è°è«ã§æããã«ãªããŸããèå³ã®ããæ¹ã¯ãSAP HANA Express Editionã®æ©èœããã¹ãããŠèªåã§ç解ããããSAP HANAã°ã©ãã§æ¥ç¶ããŒã¿ãåæããç¡æã®ã³ãŒã¹ãåè¬ããŠãã ããã
SAP HANA Cloudãªã¬ãŒã·ã§ãã«ã¯ã©ãŠãã«ããŒã¿ãé 眮ããŠãã®ãªã·ã£ã®è±éã®èŠªæãåæããå¯èœæ§ãèŠãŠã¿ãŸãããã ãå€ä»£ã®ãªã·ã£ã®ç¥è©±ãšäŒèª¬ãã«ã¯ããããã®ç»å Žäººç©ãããŠãéäžã§èª°ã誰ã®æ¯åãšå åŒã§ãããèŠããŠããªãããšãèŠããŠãããŠãã ãããããã§ç§ãã¡ã¯èªåèªèº«ã«ã¡ã¢ãæžãã決ããŠå¿ããŸããã
ãŸããSAP HANA Cloudã®ã€ã³ã¹ã¿ã³ã¹ãäœæããŸãããããããè¡ãã®ã¯éåžžã«ç°¡åã§ããå°æ¥ã®ã·ã¹ãã ã®ãã©ã¡ãŒã¿ãŒãå ¥åããã€ã³ã¹ã¿ã³ã¹ããããã€ããããŸã§æ°ååŸ ã€å¿ èŠããããŸãïŒå³1ïŒã
å³1
ã ãããç§ãã¡ã¯ããã¿ã³ã¯ããã¹ã¯ãŒããèšå®ããã€ã³ã¹ã¿ã³ã¹ã®çãååãæå®ããå¿ èŠããããŠã£ã¶ãŒããã®æåã®ããŒãžã«ã€ã³ã¹ã¿ã³ã¹ãäœæããç§ãã¡ã®åã«æŒããããã³ïŒå³2ïŒã®èª¬æ
å³2
ã¹ããã2ãã¿ã³ãã¯ãªãã¯ããŸããããã§ã®ã¿ã¹ã¯ã¯ãå°æ¥ã®SAP HANAã€ã³ã¹ã¿ã³ã¹ã®ãã©ã¡ãŒã¿ãŒãæå®ããããšã§ããããã§ã¯ãå°æ¥ã®ã·ã¹ãã ã®RAMã®ãµã€ãºã®ã¿ãèšå®ã§ããŸããä»ã®ãã¹ãŠã®ãã©ã¡ãŒã¿ãŒã¯èªåçã«æ±ºå®ãããŸãïŒå³3ïŒã
å³3ããã§
ãæå°å€ã®30 GBãšæ倧å€ã®900 GBãéžæã§ããããã«ãªããŸããã 30 GBãéžæãããšããã®ã¡ã¢ãªå®¹éã§ã¯ãèšç®ããµããŒãããããã«2ã€ã®ä»®æ³ããã»ããµãšããã£ã¹ã¯ã«ããŒã¿ãæ ŒçŽããããã«120 GBãå¿ èŠã§ããããšãèªåçã«æ±ºå®ãããŸãã SAP HANA Native Storage ExtensionïŒNSEïŒãã¯ãããžãŒã䜿çšã§ãããããããã§ããå€ãã®ã¹ããŒã¹ãå²ãåœãŠãããŸãããã倧ããªã¡ã¢ãªãµã€ãºïŒ255GBãªã©ïŒãéžæããå Žåã17åã®ä»®æ³ããã»ããµãš720GBã®ãã£ã¹ã¯ã¡ã¢ãªãå¿ èŠã«ãªããŸãïŒå³4ïŒã
å³4
ãããããã®äŸã§ã¯ããã»ã©å€ãã®ã¡ã¢ãªã¯å¿ èŠãããŸããããã©ã¡ãŒã¿ãå ã®å€ã«æ»ããã¹ããã3ãã¯ãªãã¯ããŸãã次ã«ãããŒã¿ã¬ã€ã¯ã䜿çšãããã©ãããéžæããå¿ èŠããããŸããçãã¯æçœã§ãããã¡ããã§ãããã®ãããªå®éšãè¡ãããïŒå³5ïŒã
å³5
ãã®ã¹ãããã§ã¯ãããŒã¿ã¬ã€ã¯ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããããã®ããå€ãã®åãšèªç±ããããŸããå¿ èŠãªã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ãšãã£ã¹ã¯ã¹ãã¬ãŒãžã®ãµã€ãºãéžæã§ããŸãã䜿çšãããã³ã³ããŒãã³ã/ããŒãã®ãã©ã¡ãŒã¿ãŒã¯èªåçã«éžæãããŸããã·ã¹ãã èªäœãããã³ãŒãã£ããŒã¿ãŒãããŒããšãã¯ãŒãã³ã°ãããŒãã«å¿ èŠãªã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ã決å®ããŸãããããã®ã³ã³ããŒãã³ãã«ã€ããŠè©³ããç¥ãããå Žåã¯ãSAP IQãªãœãŒã¹ãšSAP HANAã¯ã©ãŠãããŒã¿ã¬ã€ã¯ãåç §ããããšããå§ãããŸããã 次ã«ãã¹ããã4ãã¯ãªãã¯ããŸãã
å³6
ãã®ã¹ãããã§ã¯ãå°æ¥ã®SAP HANAã€ã³ã¹ã¿ã³ã¹ã«ã¢ã¯ã»ã¹ã§ããIPã¢ãã¬ã¹ãå®çŸ©ãŸãã¯å¶éããŸããã芧ã®ãšãããããããŠã£ã¶ãŒãã®æåŸã®ã¹ãããïŒå³6ïŒã§ããã[ã€ã³ã¹ã¿ã³ã¹ã®äœæ]ãã¯ãªãã¯ããŠã³ãŒããŒã泚ãã ãã§ãã
å³7
ããã»ã¹ãéå§ããïŒå³7ïŒãããã»ã©æéã¯ããããŸãããæ·±å€ã«ãããããããæ¿ãã³ãŒããŒã飲ãæéããããŸããããããŠãä»ã«ãã€ã·ã¹ãã ãèœã¡çããŠå®éšããŠãç°ãªããããããã蟌ãããšãã§ããŸããïŒããã§ãã·ã¹ãã ãäœæãããŸããïŒå³8ïŒã
å³8
SAP HANAã³ãã¯ããããŸãã¯SAP HANAããŒã¿ããŒã¹ãšã¯ã¹ãããŒã©ãŒãéããšãã2ã€ã®ãªãã·ã§ã³ããããŸãã 2çªç®ã®è£œåã¯Cockpitããèµ·åã§ããããšã¯ããã£ãŠããŸãããããã£ãŠãåæã«SAP HANAã³ãã¯ããããéããããã«äœããããã確èªããŸãããã ããæåã«ããŠãŒã¶ãŒãšãã®ãã¹ã¯ãŒããæå®ããå¿ èŠããããŸãã SYSTEMãŠãŒã¶ãŒã¯äœ¿çšã§ããªãããšã«æ³šæããŠãã ãããDBADMINã䜿çšããå¿ èŠããããŸãããã®å Žåãå³9ã®ããã«ãã€ã³ã¹ã¿ã³ã¹ã®äœææã«èšå®ãããã¹ã¯ãŒããæå®ããŸãã
å³9
ã³ãã¯ãããã«ã¢ã¯ã»ã¹ããŠãã¿ã€ã«ã®åœ¢åŒã§åŸæ¥ã®SAPã€ã³ã¿ãŒãã§ãŒã¹ã確èªããŸããããããã®ã¿ã¹ã¯ã«è²¬ä»»ããããŸããå³äžé ã«SQLã³ã³ãœãŒã«ãžã®ãªã³ã¯ããããŸãïŒå³10ïŒã
å³10
SAP HANAããŒã¿ããŒã¹ãšã¯ã¹ãããŒã©ãŒã«ã¢ã¯ã»ã¹ã§ããã®ã¯åœŒå¥³ã§ãã
ãã®ããŒã«ã®ã€ã³ã¿ãŒãã§ãŒã¹ã¯SAP Web IDEã«äŒŒãŠããŸãããããŒã¿ããŒã¹ãªããžã§ã¯ããæäœããããã ãã®ãã®ã§ãããŸã第äžã«ããã¡ãããç§ãã¡ã¯ããŒã¿ã¬ã€ã¯ã«ã©ã®ããã«ã¢ã¯ã»ã¹ãããã«é¢å¿ããããŸããçµå±ã®ãšãããããã§HANAãšé£æºããããã®ããŒã«ããªãŒãã³ããŸãããããã²ãŒã¿ãŒã®[ãªã¢ãŒããœãŒã¹]ã¢ã€ãã ã«ç§»åããŠãæ¹ãžã®ãªã³ã¯ïŒSYSRDLãRDL-Relation Data LakeïŒãèŠãŠã¿ãŸãããããããæãŸããã¢ã¯ã»ã¹ã§ãïŒå³11ïŒã
å³11å ã«
é²ã¿ãŸãããã管çè ã®ããšã§äœæ¥ããã¹ãã§ã¯ãããŸããããã¹ããŠãŒã¶ãŒãäœæããå¿ èŠããããŸãããã®äžã§HANAã°ã©ããšã³ãžã³ãè©ŠããŠã¿ãŸãããããŒã¿ã¯ãªã¬ãŒã·ã§ãã«ããŒã¿ã¬ã€ã¯ã«é 眮ããŸãã
èæ¬ïŒ
CREATE USER tstuser PASSWORD Password1 NO FORCE_FIRST_PASSWORD_CHANGE SET USERGROUP DEFAULT;
ããŒã¿ã¬ã€ã¯ã§ã®äœæ¥ãèšç»ããŠãããããããšãã°HANA_SYSRDLïŒCG_ADMIN_ROLEãªã©ã®æš©å©ã確å®ã«ä»äžããŠããªããžã§ã¯ããèªç±ã«äœæãã奜ããªããã«å®è¡ã§ããããã«ããå¿ èŠããããŸãã
èæ¬ïŒ
GRANT HANA_SYSRDL#CG_ADMIN_ROLE TO tstuser;
ããã§ãSAP HANA管çè ã®äžã§ã®äœæ¥ãå®äºããSAP HANAããŒã¿ããŒã¹ãšã¯ã¹ãããŒã©ãŒãéããããšãã§ããŸããããããæ°ããäœæãããŠãŒã¶ãŒtstuserã®äžã«å ¥åããå¿ èŠããããŸããç°¡åã«ããããã«ãSAP HANAã³ãã¯ãããã«æ»ãã管çã»ãã·ã§ã³ãçµäºããŸãããããããè¡ãã«ã¯ãå·Šäžé ã«ãè³æ Œæ å ±ã®ã¯ãªã¢ããšãããªã³ã¯ããããŸãïŒå³12ïŒã
å³12
ã¯ãªãã¯ããåŸãå床ãã°ã€ã³ããå¿ èŠããããŸãããä»ã¯ãŠãŒã¶ãŒtstuserã®äžã«ãããŸãïŒå³13ïŒã
å³13
ãããŠãSQLã³ã³ãœãŒã«ãåã³éããŠSAP HANAããŒã¿ããŒã¹ãšã¯ã¹ãããŒã©ãŒã«æ»ãããšãã§ããŸãããæ°ãããŠãŒã¶ãŒã®äžã«ãããŸãïŒå³14ïŒã
å³14
ã¹ã¯ãªããïŒ
SELECT SESSION_USER, CURRENT_SCHEMA FROM DUMMY;
以äžã§ãé©åãªãŠãŒã¶ãŒã®äžã§HANAã䜿çšããŠããããšã確èªã§ããŸãããããŒã¿ã¬ã€ã¯ã«ããŒãã«ãäœæããæãæ¥ãŸããããããè¡ãã«ã¯ãç¹å¥ãªããã·ãŒãžã£SYSRDLïŒCG.REMOTE_EXECUTEãããã1ã€ã®ãã©ã¡ãŒã¿ãŒãæž¡ãå¿ èŠããããŸã-è¡=ã³ãã³ãããã®é¢æ°ã䜿çšããŠãããŒã¿ã¬ã€ã¯ã«ããŒãã«ãäœæãïŒå³15ïŒããã¹ãŠã®ãã£ã©ã¯ã¿ãŒïŒããŒããŒãã®ãªã·ã£ã®ç¥ã ãã¿ã€ã¿ã³ïŒãæ ŒçŽããŸãã
å³15
ã¹ã¯ãªããïŒ
CALL SYSRDL#CG.REMOTE_EXECUTE ('
BEGIN
CREATE TABLE "MEMBERS" (
"NAME" VARCHAR(100) PRIMARY KEY,
"TYPE" VARCHAR(100),
"RESIDENCE" VARCHAR(100)
);
END');
次ã«ããããã®ãã£ã©ã¯ã¿ãŒã®å®¶æã®ã€ãªãããä¿æããããŒãã«ãäœæããŸãïŒå³16ïŒã
å³16
ã¹ã¯ãªããïŒ
CALL SYSRDL#CG.REMOTE_EXECUTE ('
BEGIN
CREATE TABLE "RELATIONSHIPS" (
"KEY" INTEGER UNIQUE NOT NULL,
"SOURCE" VARCHAR(100) NOT NULL,
"TARGET" VARCHAR(100) NOT NULL,
"TYPE" VARCHAR(100),
FOREIGN KEY RELATION_SOURCE ("SOURCE") references "MEMBERS"("NAME") ON UPDATE RESTRICT ON DELETE RESTRICT,
FOREIGN KEY RELATION_TARGET ("TARGET") references "MEMBERS"("NAME") ON UPDATE RESTRICT ON DELETE RESTRICT
);
END');
ããã§ã¯çµ±åã®åé¡ã¯æ±ããŸãããããã¯å¥ã®è©±ã§ããå ã®äŸã«ã¯ãã®ãªã·ã£ã®ç¥ã ãšãã®èŠªæãäœæããINSERTã³ãã³ããå«ãŸããŠããŸãããããã®ã³ãã³ãã䜿çšããŸããå³17ã«ç€ºãããã«ãããã·ãŒãžã£ãä»ããŠããŒã¿ã¬ã€ã¯ã«ã³ãã³ããæž¡ãããšãèŠããŠããå¿ èŠããããããåŒçšç¬Šã2éã«ããå¿ èŠããããŸãã
å³17
ã¹ã¯ãªããïŒ
CALL SYSRDL#CG.REMOTE_EXECUTE ('
BEGIN
INSERT INTO "MEMBERS"("NAME", "TYPE")
VALUES (''Chaos'', ''primordial deity'');
INSERT INTO "MEMBERS"("NAME", "TYPE")
VALUES (''Gaia'', ''primordial deity'');
INSERT INTO "MEMBERS"("NAME", "TYPE")
VALUES (''Uranus'', ''primordial deity'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Rhea'', ''titan'', ''Tartarus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Cronus'', ''titan'', ''Tartarus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Zeus'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Poseidon'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Hades'', ''god'', ''Underworld'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Hera'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Demeter'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Athena'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Ares'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Aphrodite'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Hephaestus'', ''god'', ''Olympus'');
INSERT INTO "MEMBERS"("NAME", "TYPE", "RESIDENCE")
VALUES (''Persephone'', ''god'', ''Underworld'');
END');
ãããŠ2çªç®ã®ããŒãã«ïŒå³18ïŒ
å³18
ã¹ã¯ãªããïŒ
CALL SYSRDL#CG.REMOTE_EXECUTE ('
BEGIN
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (1, ''Chaos'', ''Gaia'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (2, ''Gaia'', ''Uranus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (3, ''Gaia'', ''Cronus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (4, ''Uranus'', ''Cronus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (5, ''Gaia'', ''Rhea'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (6, ''Uranus'', ''Rhea'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (7, ''Cronus'', ''Zeus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (8, ''Rhea'', ''Zeus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (9, ''Cronus'', ''Hera'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (10, ''Rhea'', ''Hera'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (11, ''Cronus'', ''Demeter'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (12, ''Rhea'', ''Demeter'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (13, ''Cronus'', ''Poseidon'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (14, ''Rhea'', ''Poseidon'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (15, ''Cronus'', ''Hades'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (16, ''Rhea'', ''Hades'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (17, ''Zeus'', ''Athena'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (18, ''Zeus'', ''Ares'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (19, ''Hera'', ''Ares'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (20, ''Uranus'', ''Aphrodite'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (21, ''Zeus'', ''Hephaestus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (22, ''Hera'', ''Hephaestus'', ''hasSon'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (23, ''Zeus'', ''Persephone'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (24, ''Demeter'', ''Persephone'', ''hasDaughter'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (25, ''Zeus'', ''Hera'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (26, ''Hera'', ''Zeus'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (27, ''Hades'', ''Persephone'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (28, ''Persephone'', ''Hades'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (29, ''Aphrodite'', ''Hephaestus'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (30, ''Hephaestus'', ''Aphrodite'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (31, ''Cronus'', ''Rhea'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (32, ''Rhea'', ''Cronus'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (33, ''Uranus'', ''Gaia'', ''marriedTo'');
INSERT INTO "RELATIONSHIPS"("KEY", "SOURCE", "TARGET", "TYPE")
VALUES (34, ''Gaia'', ''Uranus'', ''marriedTo'');
END');
次ã«ãããäžåºŠãªã¢ãŒããœãŒã¹ãéããŸããããŒã¿ã¬ã€ã¯ã®ããŒãã«ã®èª¬æã«åºã¥ããŠãHANAã§ä»®æ³ããŒãã«ãäœæããå¿ èŠããããŸãïŒå³19ïŒã
å³19
äž¡æ¹ã®ããŒãã«ãæ€çŽ¢ããããŒãã«ã®åã«ãããã§ãã¯ããã¯ã¹ããªã³ã«ããŠãå³20ã«ç€ºãããã«[Create Virtual ObjectïŒsïŒ]ãã¿ã³ãã¯ãªãã¯ããŸãã
å³20
ä»®æ³ããŒãã«ãäœæãããã¹ããŒã ãæå®ããæ©äŒããããŸãããããŠããããã®ããŒãã«ãèŠã€ããããããããã«ããã¬ãã£ãã¯ã¹ãæå®ããå¿ èŠããããŸãããã®åŸãããã²ãŒã¿ãŒã§ããŒãã«ãéžæããããŒãã«ã衚瀺ããããŒã¿ã衚瀺ããŸãïŒå³21ïŒã
å³21
ãã®ã¹ãããã§ã¯ãå·Šäžã®ãã£ã«ã¿ãŒã«æ³šæããããšãéèŠã§ãããŠãŒã¶ãŒåãŸãã¯TSTUSERã¹ããŒããå¿ èŠã§ãã
ã»ãšãã©ãã¹ãŠã®æºåãæŽããŸãããæ¹ã«ããŒãã«ãäœæããŠããŒã¿ãããŒãããHANAã¬ãã«ããããŒãã«ã«ã¢ã¯ã»ã¹ããããã«ãä»®æ³ããŒãã«ãçšæããŸãããæ°ãããªããžã§ã¯ããäœæããæºåãã§ããŸãã-ã°ã©ãïŒå³22ïŒã
å³22
ã¹ã¯ãªããïŒ
CREATE GRAPH WORKSPACE "GREEK_MYTHOLOGY"
EDGE TABLE "TSTUSER"."RDL_RELATIONSHIPS"
SOURCE COLUMN "SOURCE"
TARGET COLUMN "TARGET"
KEY COLUMN "KEY"
VERTEX TABLE "TSTUSER"."RDL_MEMBERS"
KEY COLUMN "NAME";
ãã¹ãŠãæ©èœããã«ãŠã³ãã®æºåãæŽããŸããããããŠãããã«ã°ã©ãããŒã¿ã«ç°¡åãªã¯ãšãªãå®è¡ããŠã¿ãããšãã§ããŸããããšãã°ãã«ãªã¹ã®ãã¹ãŠã®åšãšãããã®åšã®ãã¹ãŠã®åšãèŠã€ããŸãããããè¡ãã«ã¯ãã°ã©ãåæèšèªã§ããCypherã圹ç«ã¡ãŸããã°ã©ããæäœããããã«ç¹å¥ã«äœæããããã®ã§ã䟿å©ã§ã·ã³ãã«ã§ãè€éãªåé¡ã®è§£æ±ºã«åœ¹ç«ã¡ãŸããCypherã¹ã¯ãªããã¯ãããŒãã«é¢æ°ã䜿çšããŠSQLã¯ãšãªã§ã©ããããå¿ èŠãããããšãèŠããŠããå¿ èŠããããŸãããã®èšèªã§ã¿ã¹ã¯ãã©ã®ããã«è§£æ±ºããããã確èªããŠãã ããïŒå³23ïŒã
å³23
ã¹ã¯ãªããïŒ
SELECT * FROM OPENCYPHER_TABLE( GRAPH WORKSPACE "GREEK_MYTHOLOGY" QUERY
'
MATCH p = (a)-[*1..2]->(b)
WHERE a.NAME = ''Chaos'' AND ALL(e IN RELATIONSHIPS(p) WHERE e.TYPE=''hasDaughter'')
RETURN b.NAME AS Name
ORDER BY b.NAME
'
)
èŠèŠçãªSAP HANAã°ã©ãåæããŒã«ãã©ã®ããã«æ©èœãããã確èªããŠã¿ãŸãããããããè¡ãã«ã¯ãããã²ãŒã¿ãŒã§ã°ã©ãã¯ãŒã¯ã¹ããŒã¹ãéžæããŸãïŒå³24ïŒã
å³24ããã§
ãã°ã©ãã衚瀺ãããŸãïŒå³25ïŒã
å³25
ãã§ã«è²ä»ããããŠããã°ã©ãã衚瀺ãããŸããããã¯ãç»é¢å³åŽã®èšå®ã䜿çšããŠè¡ããŸãããå·Šäžã«ã¯ãçŸåšéžæãããŠããããŒãã®è©³çŽ°æ å ±ã衚瀺ãããŸãã
ããŒã...ãã£ãããŒã¿ã¯ããŒã¿ã¬ã€ã¯ã«ãããSAP HANAã®ããŒã«ã䜿çšããŠããŒã¿ãåæããŸãã 1ã€ã®ãã¯ãããžãŒãããŒã¿ãèšç®ãããã1ã€ã®ãã¯ãããžãŒãããŒã¿ã®ä¿åãæ åœããŸããã°ã©ãããŒã¿ãåŠçããããšãããŒã¿ã¬ã€ã¯ããèŠæ±ãããSAP HANAã«è»¢éãããŸãããåãåããã®æéãççž®ã§ããŸããïŒ RAMã«æ ŒçŽãããããŒã¿ã¬ã€ã¯ããèªã¿èŸŒãŸããªãããŒã¿ãäœæããæ¹æ³ã¯ïŒããŒã¿ã¬ã€ã¯ããŒãã«ã®ã³ã³ãã³ããããŒãããããã®ããŒãã«ãäœæããŸãïŒå³26ïŒã
å³26
ã¹ã¯ãªããïŒ
CREATE COLUMN TABLE MEMBERS AS (SELECT * FROM "TSTUSER"."RDL_MEMBERS")
ããããå¥ã®æ¹æ³ããããŸããããã¯ãSAP HANAã®RAMãžã®ããŒã¿ã¬ããªã±ãŒã·ã§ã³ã®ã¢ããªã±ãŒã·ã§ã³ã§ããããã«ãããä»®æ³ããŒãã«ã䜿çšããŠããŒã¿ã¬ã€ã¯ã«æ ŒçŽãããŠããããŒã¿ã«ã¢ã¯ã»ã¹ããããããSQLã¯ãšãªã®ããã©ãŒãã³ã¹ãåäžããŸããä»®æ³ããŒãã«ãšã¬ããªã±ãŒã·ã§ã³ããŒãã«ãåãæ¿ããããšãã§ããŸãããããè¡ãã«ã¯ãã¬ããªã«ããŒãã«ãä»®æ³ããŒãã«ã«è¿œå ããŸããããã¯ãALTER VIRTUAL TABLEã¹ããŒãã¡ã³ãã䜿çšããŠè¡ãããšãã§ããŸãããã®åŸãä»®æ³ããŒãã«ã䜿çšããã¯ãšãªã¯ãSAP HANA RAMã«ããã¬ããªã«ããŒãã«ã«èªåçã«ã¢ã¯ã»ã¹ããŸãããããè¡ãæ¹æ³ãèŠãŠãå®éšããŠã¿ãŸãããããã®ãããªãªã¯ãšã¹ããå®è¡ããŠã¿ãŸãããïŒå³27ïŒã
å³27
ã¹ã¯ãªããïŒ
SELECT R.KEY, R.SOURCE, R.TYPE
FROM "TSTUSER"."RDL_RELATIONSHIPS" R inner join "TSTUSER"."MEMBERS" M on R.SOURCE=M.NAME
ãããŠããã®ãªã¯ãšã¹ããå®äºããã®ã«ããã£ãæéãèŠãŠã¿ãŸãããïŒå³28ïŒã
å³28
92ããªç§ããã£ãããšãããããŸããè€è£œã¡ã«ããºã ãæå¹ã«ããŸãããããããè¡ãã«ã¯ãä»®æ³ããŒãã«ã®ALTER VIRTUAL TABLEãäœæããŸãããã®åŸãLakeããŒã¿ãSAP HANA RAMã«è€è£œãããŸãã
èæ¬ïŒ
ALTER VIRTUAL TABLE "RDL_RELATIONSHIPS" ADD SHARED SNAPSHOT REPLICA COLUMN LOADABLE;
å³29ã®ããã«å®è¡æéã確èªããŠã¿ãŸããã ã
å³29
ã¯7ããªç§ã§ããããã¯çŽ æŽãããçµæã§ãïŒæå°éã®åŽåã§ãããŒã¿ãRAMã«ç§»åããŸãããããã«ãåæãå®äºããããã©ãŒãã³ã¹ã«æºè¶³ããããã¬ããªã±ãŒã·ã§ã³ãåã³ãªãã«ããããšãã§ããŸãïŒå³30ïŒã
å³30
ã¹ã¯ãªããïŒ
ALTER VIRTUAL TABLE "RDL_RELATIONSHIPS" DROP REPLICA;
ããã§ãããŒã¿ã¯ãªã¯ãšã¹ãã«å¿ããŠã®ã¿æ¹ããåã³ããŠã³ããŒããããSAP HANA RAMã¯æ°ããã¿ã¹ã¯ã®ããã«ç¡æã§ããä»æ¥ãç§ã®æèŠã§ã¯ãèå³æ·±ãä»äºãããSAP HANA Cloudããã¹ãããŠãåäžã®ããŒã¿ã¢ã¯ã»ã¹ãã€ã³ãããã°ããç°¡åã«æ§æã§ãããã©ããããã¹ãããŸããã補åãéçºãããè¿ãå°æ¥ãããŒã¿ã¬ã€ã¯ãžã®çŽæ¥æ¥ç¶ãçŸãããšäºæ³ãããŸãããã®æ°æ©èœã«ããã倧éã®æ å ±ã®ããŠã³ããŒãé床ãéããªããäžèŠãªãµãŒãã¹ããŒã¿ãæåŠãããããŒã¿ã¬ã€ã¯åºæã®æäœã®çç£æ§ãåäžããŸããSAP IQãã¯ãããžãŒã䜿çšããŠãããŒã¿ã¯ã©ãŠãå ã§ã¹ãã¢ãããã·ãŒãžã£ãçŽæ¥äœæããã³å®è¡ããŸããã€ãŸããããŒã¿èªäœãååšããå Žæã«åŠçããã³ããžãã¹ããžãã¯ãé©çšã§ããŸãã
SAP CISãã·ãã¢ããžãã¹ã¢ãŒããã¯ããAlexander Tarasovæ°