An HDC graph resides in the memory of an HDC (High-Density Computing) server and contains all or part of the data loaded from a graphset, which is physically stored across one or multiple shard servers.
To load the entire current graphset to hdc-server-1
as hdcGraph
:
CALL hdc.graph.create("hdc-server-1", "hdcGraph", {
nodes: {"*": ["*"]},
edges: {"*": ["*"]},
direction: "undirected",
load_id: true,
update: "static",
query: "query",
default: false
})
hdc.graph.create("hdcGraph", {
nodes: {"*": ["*"]},
edges: {"*": ["*"]},
direction: "undirected",
load_id: true,
update: "static",
query: "query",
default: true
}).to("hdc-server-1")
To load account
and movie
nodes with selected properties and incoming rate
edges in the current graphset to hdc-server-1
as hdcGraph_1
, while omitting nodes' _id
values:
CALL hdc.graph.create("hdc-server-1", "hdcGraph_1", {
nodes: {
"account": ["name", "gender"],
"movie": ["name", "year"]
},
edges: {"rate": ["*"]},
direction: "in",
load_id: false,
update: "static",
query: "query",
default: false
})
hdc.graph.create("hdcGraph_1", {
nodes: {
"account": ["name", "gender"],
"movie": ["name", "year"]
},
edges: {"*": ["*"]},
direction: "in",
load_id: false,
update: "static",
query: "query",
default: false
}).to("hdc-server-1")
For details, see Managing HDC Projections (GQL) or Managing HDC Projections (UQL).