neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
621 stars 160 forks source link

Cypher Projection + SubGraph #210

Closed MattyCrowther closed 2 years ago

MattyCrowther commented 2 years ago

Hi, I am unsure if this is an issue. I am using the cypher projection to project a graph. From this I am using the gds.beta.graph.project.subgraph to further modify the graph. Are these two functions compatible with one another? Or so I need to do a native projection instead of a cypher projection? Because when it is does this way, I get errors such as:

neo4j.exceptions.ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure gds.beta.graph.project.subgraph: Caused by: org.neo4j.gds.beta.filter.expression.SemanticErrors: Semantic errors while parsing expression: Unknown label ATC.

MattyCrowther commented 2 years ago

Just a follow-up to this when I perform a cypher-projection the schema is as follows: {'relationships': {'ALL': {}}, 'nodes': {'ALL': {}}} Is this always the case that the schema is unable to be accurately derived when a cypher-projection occurs?

FlorentinD commented 2 years ago

Hello @MattyCrowther , Also with cypher projections you can have a graph schema in the GDS graph. I can recommend you to look at https://neo4j.com/docs/graph-data-science/current/graph-project-cypher/#_multi_graph for how to also project the labels and types.

MattyCrowther commented 2 years ago

Sorry, yes you're correct. Thanks very much for your help!