Estimating the memory requirement for a projected graph defined with Cypher projection is achieved thanks to the following syntax:
CALL gds.graph.create.cypher.estimate(
"MATCH (n) RETURN id(n)",
"MATCH (u)--(v) RETURN id(u) as source, id(v) as target"
)
Note the difference compared to real graph creation with Cypher projection, which would be as follows:
CALL gds.graph.create.cypher(
"projGraphName",
"MATCH (n) RETURN id(n) as id",
"MATCH (u)--(v) RETURN id(u) as source, id(v) as target"
)
The graph name parameter has to be skipped in the estimate scenario.
Knowing how much memory is required by a projected graph is one thing. But usually, we create projected graphs to run some algorithms on them. Therefore, being able to estimate the memory consumption of algorithms is also crucial to determining the size of the machine we will need to use.